From: Jeff E. <jem...@fr...> - 2007-12-13 18:31:00
|
Because the implementation of the socket module in Jython is different from the C Python implementation. Don't write code that relies on implementation details. Daniel Menezes wrote: > Why this code work fine in Python 2.5 and don't work in Jython 2.2.1? > > On Dec 13, 2007 3:09 PM, Jeff Emanuel <jem...@fr...> wrote: > >> Aren't names that begin with _ considered private >> implementation details? >> >> >> Daniel Menezes wrote: >>> When call socket._fileobject, return error: 'module' object has no >> attribute >>> '_fileobject' >>> >>> ========================= >>> Jython 2.2.1 (don't work) >>> ========================= >>> >>> C:\jython2.2.1>jython.bat >>>>>> import socket >>>>>> socket._fileobject >>> Traceback (innermost last): >>> File "<console>", line 1, in ? >>> AttributeError: 'module' object has no attribute '_fileobject' >>> >>> >>> ===================== >>> Python 2.5 (work fine) >>> ===================== >>> C:\Python25>python.exe >>>>>> import socket >>>>>> socket._fileobject >>> <class 'socket._fileobject'> >>> >>> >>> Anyone can help me? >>> >>> >>> Thanks. >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >> ------------------------------------------------------------------------- >>> SF.Net email is sponsored by: >>> Check out the new SourceForge.net Marketplace. >>> It's the best place to buy or sell services >>> for just about anything Open Source. >>> >> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Jython-users mailing list >>> Jyt...@li... >>> https://lists.sourceforge.net/lists/listinfo/jython-users > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > > ------------------------------------------------------------------------ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |