On Mon, Jan 15, 2007 at 11:40:22PM +0100, "Martin v. L??wis" wrote:
> > Do I just suffer from having an overactive imagination?  Are all of
> > these implementation strategies impossible for some reason, and there
> > are no others?
> 
> Yes, and yes.

What about turning all references to obj.items into the equivalent
bytecode for this:

if isinstance(obj, dict): # XXX should this be 'type(obj) is dict'?
   if <2.x behaviour>:   _temp = obj.items
   elif <3.x behaviour>: _temp = obj.iteritems
else:
   _temp = obj.items

Ugly; very ugly.

--amk

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to