A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-February/012517.html below:

[Python-Dev] Generalized "from M. import X" was RE: Python 2.1 alpha 2 released)

[Python-Dev] Generalized "from M. import X" was RE: Python 2.1 alpha 2 released) [Python-Dev] Generalized "from M. import X" was RE: Python 2.1 alpha 2 released)Moshe Zadka moshez@zadka.site.co.il
Sat, 3 Feb 2001 09:12:44 +0200 (IST)
On Sat, 3 Feb 2001 01:53:53 -0500, "Tim Peters" <tim.one@home.com> wrote:
 
> >>> alist = []
> >>> hasattr(alist, "sort")
> 1
> >>> from alist import sort
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: No module named alist
> >>>

Tim, don't you remember to c.l.py discussions?

>>> class Foo:
...     pass
...
>>> foo=Foo()
>>> foo.foo = 'foo'
>>> import sys
>>> sys.modules['foo'] = foo
>>> import foo
>>> print foo.foo
foo
>>> from foo import foo
>>> print foo
foo
>>>

-- 
Moshe Zadka <sig@zadka.site.co.il>
This is a signature anti-virus. 
Please stop the spread of signature viruses!
Fingerprint: 4BD1 7705 EEC0 260A 7F21  4817 C7FC A636 46D0 1BD6



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