Re: [Httplib2-discuss] __builtins__ usage
Status: Beta
Brought to you by:
jcgregorio
From: Joe G. <jo...@bi...> - 2006-12-18 16:28:29
|
Now fixed in the trunk. Thanks!, -joe On 12/18/06, Sanghyeon Seo <sa...@gm...> wrote: > Hello, > > I am trying to run httplib2 on IronPython. And the first hurdle is the > usage of __builtins__ in httplib2. > > Python Library Reference states: > http://docs.python.org/lib/module-builtin.html > > "As an implementation detail, most modules have the name __builtins__ > (note the "s") made available as part of their globals. The value of > __builtins__ is normally either this module or the value of this > modules's __dict__ attribute. Since this is an implementation detail, > it may not be used by alternate implementations of Python." > > And indeed it isn't. So I'd like this to be changed. > > Current code: > > if 'sorted' not in __builtins__: > # replacement code > > Suggestion 1: > > try: > sorted > except NameError: > # replacement code > > Suggestion 2: > > if sys.version_info < (2, 4): > # replacement code > > -- > Seo Sanghyeon > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Httplib2-discuss mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/httplib2-discuss > -- Joe Gregorio http://bitworking.org |