-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added vector union, string and struct union support for Python #3
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some things to consider. View full project report here.
from flatbuffers.compat import import_numpy | ||
np = import_numpy() | ||
|
||
class Attacker(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class Attacker(object): | |
class Attacker: |
Attacker
inherits from object
by default, so explicitly inheriting from object is redundant. Removing it keeps the code simpler. Explained here.
def End(builder): | ||
return AttackerEnd(builder) | ||
|
||
class AttackerT(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class AttackerT(object): | |
class AttackerT: |
Similarly, Explicitly inheriting from object is redundant.
from flatbuffers.compat import import_numpy | ||
np = import_numpy() | ||
|
||
class BookReader(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class BookReader(object): | |
class BookReader: |
BookReader
inherits from object
by default, so explicitly inheriting from object is redundant. Removing it keeps the code simpler. More info.
return builder.Offset() | ||
|
||
|
||
class BookReaderT(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class BookReaderT(object): | |
class BookReaderT: |
Same as above: Explicitly inheriting from object is redundant.
|
||
# namespace: | ||
|
||
class Character(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class Character(object): | |
class Character: |
Character
inherits from object
by default, so explicitly inheriting from object is redundant. Removing it keeps the code simpler. Read more.
def End(builder): | ||
return HandFanEnd(builder) | ||
|
||
class HandFanT(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class HandFanT(object): | |
class HandFanT: |
Similarly, Explicitly inheriting from object is redundant.
from flatbuffers.compat import import_numpy | ||
np = import_numpy() | ||
|
||
class Movie(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class Movie(object): | |
class Movie: |
Movie
inherits from object
by default, so explicitly inheriting from object is redundant. Removing it keeps the code simpler. Read more.
except: | ||
pass | ||
|
||
class MovieT(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class MovieT(object): | |
class MovieT: |
Again, Explicitly inheriting from object is redundant.
from flatbuffers.compat import import_numpy | ||
np = import_numpy() | ||
|
||
class Rapunzel(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class Rapunzel(object): | |
class Rapunzel: |
Rapunzel
inherits from object
by default, so explicitly inheriting from object is redundant. Removing it keeps the code simpler. Read more.
return builder.Offset() | ||
|
||
|
||
class RapunzelT(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class RapunzelT(object): | |
class RapunzelT: |
As above, Explicitly inheriting from object is redundant.
No description provided.