Skip to content

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
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