On 06/27/2013 08:18 AM, Eric Snow wrote: > 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. So in Python space the options are either: if some_class.__definition_order__ is not None: or if getattr(some_class, '__definition_order__', None) is not None: ? Seems like always defined would be easier. -- ~Ethan~
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4