[Python-Dev] Classes with ordered namespaces

Eric Snow ericsnowcurrently at gmail.com
Thu Jun 27 17:18:30 CEST 2013

On Thu, Jun 27, 2013 at 2:48 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> I think the main concern I would have is whether other implementations
> are happy they can provide a suitable ordered dictionary for class
> namespace execution.
> It's also worth considering what would have to happen for dynamically
> created types where the namespace passed in *wasn't* ordered.

Good points.  In either case there is no definition order available.
I'm okay with that.  Would it be better to represent that as None (and
the attribute is always defined) or by having the attribute undefined?
 I'd rather always have the attribute, but I expect the significantly
simpler solution is to leave the attribute undefined when definition
order is not available.  So I'd go with the latter.


More information about the Python-Dev mailing list