Article View: pl.comp.lang.python
Article #27679Re: Ile funkcja ma parametrów i "Predefined Completions" PyDev
From: Wojciech Muła
Date: Thu, 23 Sep 2010 13:51
Date: Thu, 23 Sep 2010 13:51
20 lines
1604 bytes
1604 bytes
max <max@max.pl> wrote: > Mały przykład: > import math > a = dir(math) > print(a) > > ['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', > 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', > 'e', 'exp', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', > 'hypot', 'isinf', 'isnan', 'ldexp', 'log', 'log10', 'log1p', 'modf', > 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc'] > > Jak teraz dla każdej funkcji (o ile to jest funkcja) > sprawdzić ile ma parametrów , ewentualnie jakie. Moduł inspect, funkcja getargspec: http://docs.python.org/library/inspect.html?highlight=inspect#inspect.getargspec w.
Technical Details
Message-ID:
<20100923155108.b90f010c.wojciech_mula@poczta.null.onet.pl.invalid>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mailReferences:
<i7fkia$sjs$1@portraits.wsisiz.edu.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail From: Wojciech Muła <wojciech_mula@poczta.null.onet.pl.invalid> Newsgroups: pl.comp.lang.python Subject: Re: Ile funkcja ma parametrów i "Predefined Completions" PyDev Date: Thu, 23 Sep 2010 15:51:08 +0200 Organization: http://onet.pl Lines: 22 Message-ID: <20100923155108.b90f010c.wojciech_mula@poczta.null.onet.pl.invalid> References: <i7fkia$sjs$1@portraits.wsisiz.edu.pl> NNTP-Posting-Host: public94012.xdsl.centertel.pl Mime-Version: 1.0 X-Trace: news.onet.pl 1285249871 17996 188.47.239.60 (23 Sep 2010 13:51:11 GMT) X-Complaints-To: niusy@onet.pl NNTP-Posting-Date: Thu, 23 Sep 2010 13:51:11 +0000 (UTC) X-Newsreader: Sylpheed 2.5.0 (GTK+ 2.10.14; i686-pc-mingw32) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit