Article View: pl.comp.lang.python
Article #27356Re: Przestrzeń nazw (?)
From: pr
Date: Sun, 14 Mar 2010 14:23
Date: Sun, 14 Mar 2010 14:23
26 lines
1904 bytes
1904 bytes
On 14 Mar, 14:04, "Jordan Szubert" <n...@podam.na.razie> wrote: > Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information.>>> class A: > > ... class AA: > ... obj=None > ...>>> class B: > > ... class BB: > ... obj=A() > ... > > >>> A.AA.obj=B() > >>> a=A() > >>> b=B() Tak, wiem, że tak można zrobić, aczkolwiek chce tego uniknąć.. myślałem, że może jest jakiś sposób np. poprzez bardziej skomplikowane użycie modułów.. Np przed obj = B() wywołać: import obecny_modul obj = obecny_modul.B() Tylko coś mi to na py3.1 nie do końca działa..
Technical Details
Message-ID:
<1e85ef31-9a04-4367-a374-43ddc2d738a7@u9g2000yqb.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.glorb.com!postnews.google.com!u9g2000yqb.googlegroups.com!not-for-mailReferences:
<9100aa5e-8f93-493a-8e57-23dd86779de2@o3g2000yqb.googlegroups.com> <op.u9j6lmiius2y1v@klaptop7>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.glorb.com!postnews.google.com!u9g2000yqb.googlegroups.com!not-for-mail From: pr <cricogik@gmail.com> Newsgroups: pl.comp.lang.python Subject: Re: Przestrzeń nazw (?) Date: Sun, 14 Mar 2010 07:23:39 -0700 (PDT) Organization: http://groups.google.com Lines: 29 Message-ID: <1e85ef31-9a04-4367-a374-43ddc2d738a7@u9g2000yqb.googlegroups.com> References: <9100aa5e-8f93-493a-8e57-23dd86779de2@o3g2000yqb.googlegroups.com> <op.u9j6lmiius2y1v@klaptop7> NNTP-Posting-Host: 81.186.224.2 Mime-Version: 1.0 X-Trace: posting.google.com 1268576619 10544 127.0.0.1 (14 Mar 2010 14:23:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 14 Mar 2010 14:23:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u9g2000yqb.googlegroups.com; posting-host=81.186.224.2; posting-account=0dYzQQoAAADD4mKBs1MFtArJhD70zsVy User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2) Gecko/20100115 Firefox/3.6,gzip(gfe),gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit