Re: doc tags?

2005-05-13 Thread Wolfram Kriesing
which might make it into the standard lib, to be available like the doc-string also inside the code - i really like the __doc__) -- cu Wolfram On 5/13/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Wolfram Kriesing wrote: > > > i was already searching and remember i had seen

doc tags?

2005-05-13 Thread Wolfram Kriesing
i was already searching and remember i had seen something like "its not needed". Anyway, are there any doc tags, like in Java/PHPDoc etc, where you can describe parameters (@param[eter]), return values (@ret[urn]), attributes (@var), references (@see), etc? I guess I have just not found the link

Re: function with variable arguments

2005-05-13 Thread Wolfram Kriesing
> def Range(n,m=None,step=1): > if m is None: > n,m = 0,n+1 > else: > n,m = n,m+1 > return range(n,m,step) i like this one. coming from php (just a couple weeks ago) its always again interesting to see how i have to start thinking to program differently, it can be so much easier wi

Re: function with variable arguments

2005-05-13 Thread Wolfram Kriesing
using default args does actually solve it what about def Range(n, m=None, step=None) if step==None: if m==None: range(n) else: range(n,m) else: if m==None: raise Exception, "missing parameter m" else: range(n,m,step) can be optimized i am sure :-) --