fred.haab wrote:
Well, others have answered the question, but I thought I'd throw in
that it would be more pythonic to do something like:
def Get_Relative_Path(target, base = None):
if base is None:
base = os.curdir
...
Since os.curdir is a constant, this is nonesensical. On
"fred.haab" <[EMAIL PROTECTED]> writes:
> Well, others have answered the question, but I thought I'd throw in
> that it would be more pythonic to do something like:
>
> def Get_Relative_Path(target, base = None):
> if base is None:
> base = os.curdir
> ...
Even more Pythonic woul
Well, others have answered the question, but I thought I'd throw in
that it would be more pythonic to do something like:
def Get_Relative_Path(target, base = None):
if base is None:
base = os.curdir
...
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-07-29, Stef Mientki <[EMAIL PROTECTED]> wrote:
> brings me to one other question:
> I guess this function is only evaluated once, is that correct ?
Yes.
> about '.' being the current directory, well I think windows
> was thrown at the market about 25 years ago, and since then we
> don'
On Tue, 29 Jul 2008 09:43:26 +0200, Stef Mientki wrote:
> about '.' being the current directory, well I think windows was thrown
> at the market about 25 years ago, and since then we don't use '.'
> anymore ;-)
No, even Windows uses '.' as the current directory -- at least XP does, I
haven't tri
Terry Reedy wrote:
To answer the subject line:
param=
will assign the result of the expression as the default argument
object for the parameter.
thanks Terry and others,
brings me to one other question:
I guess this function is only evaluated once, is that correct ?
about os.curdir,
I chec
To answer the subject line:
param=
will assign the result of the expression as the default argument object
for the parameter.
tjr
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 28, 3:28 pm, Stef Mientki <[EMAIL PROTECTED]> wrote:
> hello,
>
> I've a perfect working procedure,
> at least as far I've tested it it works perfect.
>
> But I was just experimenting with inspect,
> and saw that the default argument was not parsed correctly.
>
> So I wonder if this is allow
On Mon, Jul 28, 2008 at 5:28 PM, Stef Mientki <[EMAIL PROTECTED]> wrote:
> hello,
>
> I've a perfect working procedure,
> at least as far I've tested it it works perfect.
>
> But I was just experimenting with inspect,
> and saw that the default argument was not parsed correctly.
>
> So I wonder if
On Jul 28, 1:28 pm, Stef Mientki <[EMAIL PROTECTED]> wrote:
> hello,
>
> I've a perfect working procedure,
> at least as far I've tested it it works perfect.
>
> But I was just experimenting with inspect,
> and saw that the default argument was not parsed correctly.
>
> So I wonder if this is allow
hello,
I've a perfect working procedure,
at least as far I've tested it it works perfect.
But I was just experimenting with inspect,
and saw that the default argument was not parsed correctly.
So I wonder if this is allowed:
def Get_Relative_Path ( target, base=os.curdir ) :
...
As inspect r
11 matches
Mail list logo