On Fri, May 13, 2011 at 8:28 PM, Amaury Forgeot d'Arc <amaur...@gmail.com>wrote:
> Hi, > > 2011/5/13 cool-RR <cool...@cool-rr.com>: > > Hey, > > Here's something I thought about that might be a compatibility problem, > not > > sure if it's a problem in production. When you take a method of a builtin > in > > Pypy, for example `str.join`, it seems to create a new object which is > > weakreffable, where in CPython it's not. I was just looking at Django's > > signal mechanism: > > > http://docs.djangoproject.com/en/1.3/topics/signals/#listening-to-signals > > It creates a weak reference to the signal-handler function, and if it > dies, > > the link is destroyed. > > Do you think this might be a problem? > > But why would you use an unbound method of a builtin type > as a signal handler? > > Note that "sender" is passed as first argument to the function, > whereas i.e. str.join expected a string. > > -- > Amaury Forgeot d'Arc > In the case of Django signal handlers it would probably not be a problem in practice, but in other systems it might become a problem so if it can be fixed early (e.g. by making `list.__add__ is list.__add__` True in Pypy as it is in CPython) it might save us some trouble later. Ram.
_______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev