Skip to content

Styling/coding standards #3

@Tirpitz93

Description

@Tirpitz93

Which coding standards/PEP guides are you planning to adhere to.
As this is a python library aimed at python users(presumably) the PEPs would be a good place to start.

Also when implementing the classes there are a couple options regarding the OOP interface as I see it:

  1. literal translations so getPos player becomes player.getPos(). or player.get_pos()
  2. @property decorator to wrap the calls to the DLL to the user so that getPos player becomes player.pos , and player setPos [a,b,c] becomes player.pos = [a,b,c].
  3. Both of the above, having one approach call the other for example. This illustrates both approaches, and is therefor less pythonic ("one way to do something").
     class RV_Object(object):
        def __init__(self):
           # todo
           pass

        @property
        def pos(self)->tuple:pass

        @pos.setter
        def pos(self, pos:tuple)->None:pass

        def get_pos(self)->tuple: pass # todo

        def set_pos(self, pos:tuple)->None: pass # todo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions