RE: [sqlalchemy] Enum example

2013-05-12 Thread Alexey Vihorev
Oh, I completely forgot about 2to3. Thanks, it works now! From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Michael Bayer Sent: Sunday, May 12, 2013 8:48 PM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Enum example I'm sure you hit the "print"

Re: [sqlalchemy] Enum example

2013-05-12 Thread Michael Bayer
Once the reference implementation is available I have other plans for that enum, assuming I can bend it to my will I want to illustrate some variants on it. Sent from my iPhone On May 12, 2013, at 2:30 PM, Christoph Zwerschke wrote: > It might be still worthwhile to revisit that example now t

Re: [sqlalchemy] Enum example

2013-05-12 Thread Christoph Zwerschke
It might be still worthwhile to revisit that example now that http://www.python.org/dev/peps/pep-0435/ has been accepted. -- Christoph -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from i

Re: [sqlalchemy] Enum example

2013-05-12 Thread Michael Bayer
I'm sure you hit the "print" statement also. The example uses a metaclass. Metaclasses in Py3k look like: class DeclEnum(metaclass=EnumMeta): """Declarative enumeration.""" # ... if you run 2to3 on the script these changes are made and it works fine: 2to3 -w decl_enum.py On May

[sqlalchemy] Enum example

2013-05-12 Thread Alexey Vihorev
Hi! I'm trying to run enum example provided here http://techspot.zzzeek.org/files/2011/decl_enum.py and it fails with this: C:\Python32\lib\site-packages\sqlalchemy\sql\expression.py:1983: SAWarning: The IN-predicate on "employee.type" was invoked with an empty sequence. This results in a c