On Thu, Apr 20, 2017 at 10:58 AM, Ethan Furman wrote:
> I'm curious, what did you find ugly with:
>
> class TestEnum(CallableEnum):
>
> @enum
> def hello(text):
> "a pleasant greeting"
> print('hello,', text)
>
> @enum
> def goodby
On 04/21/2017 09:04 AM, Stephan Hoyer wrote:
On Thu, Apr 20, 2017 at 10:58 AM, Ethan Furman wrote:
I'm curious, what did you find ugly with:
class TestEnum(CallableEnum):
@enum
def hello(text):
"a pleasant greeting"
print('hello,', text)
On Fri, Apr 21, 2017 at 9:43 AM, Ethan Furman wrote:
> You have to use the complete module name? Instead of `from callable_enum
> import Enum, Value`? Ouch
Yeah... it took me a while to come around to this one. But the rule does
start to pay off in large code bases.
__
OT, but...
You have to use the complete module name? Instead of `from callable_enum
> import Enum, Value`? Ouch.
yes, but:
"""
Use from x import y as z if two modules named y are to be imported or if y is
an inconveniently long name.
"""
(https://google.github.io/styleguide/pyguide.html?show