On 12/21/2012 03:52 AM, Duncan Booth wrote:
Mitya Sirenef wrote:
On 12/21/2012 12:23 AM, iMath wrote:
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
From the point of style, of course, the latter is
much better because that'
Mitya Sirenef wrote:
> On 12/21/2012 12:23 AM, iMath wrote:
>> Pass and return
>> Are these two functions the same ?
>>
>> def test():
>> return
>>
>> def test():
>> pass
>
>
> From the point of style, of course, the l
On Thu, 20 Dec 2012 21:23:58 -0800, iMath wrote:
> Pass and return
> Are these two functions the same ?
They are neither functions, nor are they the same.
Check if they are functions:
- can you pass them arguments?
- can you assign their result to a target?
No.
py> pass(23)
File &
On Fri, Dec 21, 2012 at 4:23 PM, iMath wrote:
> Pass and return
> Are these two functions the same ?
>
> def test():
> return
>
> def test():
> pass
They're different statements, but in this case they happen to
accomplish the same thing.
The pas
On 12/21/2012 12:23 AM, iMath wrote:
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
From the point of style, of course, the latter is
much better because that's the idiomatic way
to define a no-op function. With a return, it
On 12/21/2012 12:23 AM, iMath wrote:
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
I believe they are the same, but these statements have
different meanings in other circumstances, e.g.:
Class A(object): pass
def test():
if x
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
--
http://mail.python.org/mailman/listinfo/python-list
printf("Didn't work, NO INT");
}
}
}
kind regards,
Pieter
-- Doorgestuurd bericht --
From: "Diez B. Roggisch" <[EMAIL PROTECTED]>
To: python-list@python.org
Date: Thu, 10 Apr 2008 12:23:56 +0200
Subject: Re: call python from c ->
Pieter wrote:
> Hi all,
>
> I'm trying to call a python function from c. I need to pass an
> 2D-array to python and the python function returns a 2D-list back to
> c. I googled arround and I found how to pass ints/strings/... back and
> forth, but didn't find anything on passing arrays.
>
> For
Hi all,
I'm trying to call a python function from c. I need to pass an
2D-array to python and the python function returns a 2D-list back to
c. I googled arround and I found how to pass ints/strings/... back and
forth, but didn't find anything on passing arrays.
For an int it's as simple as this:
10 matches
Mail list logo