Skip to content
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

Add blockData Enums #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hashbangstudio
Copy link
Contributor

Add enums defining variant of block
For example the colour of a wool block or the direction stairs point
Use back ported IntEnum as allows direct integer comparison
Available in 2.7, 3.2 and 3.4
https://pypi.python.org/pypi/enum34
https://docs.python.org/3/library/enum.html#intenum

Add enums defingin variant of block
For example the colour of a wool block
from enum import IntEnum


# available 0-1 affects whether striking block sets off fuse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a docstring please.

@doismellburning
Copy link
Member

I suspect those names aren't Pythony with the lower-casedness?

class Double_slab_type(IntEnum):

(Unless there's some odd convention for Enum that I haven't yet found...)

@hashbangstudio
Copy link
Contributor Author

What do people prefer ?
DoubleSlabType class style
double_slab_type variable style
DOUBLE_SLAB_TYPE constant style
blockType enum is mixedCase
or something else?

Think should be consistent with whatever blockType is though

@doismellburning
Copy link
Member

They're classes, so unless you've found some PEP8-y thing that has different opinions for enums, it's CapWords

@hashbangstudio
Copy link
Contributor Author

blockType should be changed in block.py as well then, will add to #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants