You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by davebshow <gi...@git.apache.org> on 2017/05/11 14:51:55 UTC

[GitHub] tinkerpop pull request #:

Github user davebshow commented on the pull request:

    https://github.com/apache/tinkerpop/commit/f99f5524183891372ae7ac60651ff8ac7d23e7d7#commitcomment-22104442
  
    In gremlin-python/src/main/jython/tests/process/test_dsl.py:
    In gremlin-python/src/main/jython/tests/process/test_dsl.py on line 41:
    I think this is good except that all the methods for the anonymous DSL traversal should return the corresponding DSL traversal. Maybe an approach similar to the one used with SocialTraversalSource, where the `graph_traversal` attribute is assigned as a class attribute would be best:
    ```python
    class ___(__):
        graph_traversal = SocialTraversal
    ```
    
    The static methods would then need to be changed to class methods, and would look like:
    
    ```python
        @classmethod
        def knows(cls, person_name):
            return cls.graph_traversal(None, None, Bytecode()).knows(person_name)
    ```
    This would of course require changes to the groovy code that generates the `__` class.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---