From: John G. <jgo...@co...> - 2001-09-26 13:40:16
|
In Jython: Jython 2.1a3 on java1.1.8 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> dir("") [] >>> ".".join(['1', '2', '3', '4']) '1.2.3.4' >>> dir([]) ['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] In Python: Python 2.0.1 (#0, Jun 23 2001, 23:50:30) [GCC 2.95.4 20010319 (Debian prerelease)] on linux2 Type "copyright", "credits" or "license" for more information. >>> dir("") ['capitalize', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper'] >>> ".".join(['1', '2', '3', '4']) '1.2.3.4' >>> dir([]) ['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] Why is Jython's dir() not showing methods that clearly exist? The last version of Python that didn't show those on dir("") didn't actually have them. -- John Goerzen <jgo...@co...> GPG: 0x8A1D9A1F www.complete.org |