[IronPython] type.__call__
Sanghyeon Seo
sanxiyn at gmail.com
Tue Jul 11 08:28:27 CEST 2006
Okay, I admit I have never imagined Python code like this.
# test.py
class MetaClass(type):
def __call__(self, *args):
print args
class Class(object):
__metaclass__ = MetaClass
Class(1, 2, 3)
Found while trying to run SQLAlchemy (http://sqlalchemy.org/), a
Python ORM library.
* * *
There also seems to be a strange import bug, but I couldn't reduce it.
How to reproduce:
import sqlalchemy
Workaround. Swapping following two lines seem to "fix" this with no ill effect:
from sqlalchemy import util
import util as mapperutil
To:
import util as mapperutil
from sqlalchemy import util
Seo Sanghyeon
More information about the Ironpython-users
mailing list