[IronPython] type.__call__
Dino Viehland
dinov at exchange.microsoft.com
Tue Jul 11 17:24:16 CEST 2006
Awesome, thanks for reporting this, it looks like we need to special case overriding virtuals w/ ICallerContext and deal w/ the param args as well. I've opened CodePlex bug #871 for this (http://www.codeplex.com/WorkItem/List.aspx?ProjectName=IronPython).
-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Monday, July 10, 2006 11:28 PM
To: Discussion of IronPython
Subject: [IronPython] type.__call__
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
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list