This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients Arfrever, barry, brett.cannon, eric.araujo, eric.snow, loewis, ncoghlan
Date 2012-05-31.06:21:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338445317.75.0.560983194528.issue14673@psf.upfronthosting.co.za>
In-reply-to
Content
> History with dictproxy means I'm also OK with "new type by stealth".
> Perhaps add some tests to check "type(sys.implementation)()" does
> something sane?

Test added.  Here's what happens:

  >>> cls = type(sys.implementation)
  >>> cls()
  namespace()
  >>> cls(x=1, y=2)
  namespace(x=1, y=2)

Though it's not immediately a problem, "vars(cls(x=1, y=2))" returns "{}", while "ns=cls(x=1, y=2); vars(ns)" returns "{'x': 1, 'y': 2}"!

Certainly it's a corner case, but it could indicate a more sinister problem.  Regardless, I'll track down the root cause and fix it.  As far as I can tell, this odd behavior does not impact sys.implementation.
History
Date User Action Args
2012-05-31 06:21:57eric.snowsetrecipients: + eric.snow, loewis, barry, brett.cannon, ncoghlan, eric.araujo, Arfrever
2012-05-31 06:21:57eric.snowsetmessageid: <1338445317.75.0.560983194528.issue14673@psf.upfronthosting.co.za>
2012-05-31 06:21:57eric.snowlinkissue14673 messages
2012-05-31 06:21:56eric.snowcreate