On Mar 15, 1:01 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Fri, 14 Mar 2008 11:32:41 -0700, Lie wrote:
No, there is no need for void return type, what I meant is that
everything that's not said in the documentation should be assumed to
be an implementation detail, a method or
On Fri, 14 Mar 2008 11:32:41 -0700, Lie wrote:
No, there is no need for void return type, what I meant is that
everything that's not said in the documentation should be assumed to
be an implementation detail, a method or a function that doesn't say
anything about its return type should be
On Thu, Mar 13, 2008 at 8:36 AM, Hendrik van Rooyen
[EMAIL PROTECTED] wrote:
foo = [1,2,3,4]
x = foo.append(5)
print x
What will be the output (choose one):
1) [1,2,3,4]
2) [1,2,3,4,5]
3) That famous picture of Albert Einstein sticking out his tongue
4) Nothing - no output
Lie napisał(a):
foo = [1,2,3,4]
x = foo.append(5)
print x
What will be the output (choose one):
1) [1,2,3,4]
2) [1,2,3,4,5]
3) That famous picture of Albert Einstein sticking out his tongue
4) Nothing - no output
5) None of the above
I undertake to summarise answers posted to
On Mar 13, 1:56 pm, yoz [EMAIL PROTECTED] wrote:
This will cause a hidden feature of python and the OS, known as the
'python easter egg', to activate - erasing all data on the hard disk and
then reporting how many bytes of data are left.
Usually None ;-} - This really is a 'gotcha'
On Mar 14, 4:57 pm, Jarek Zgoda [EMAIL PROTECTED] wrote:
Lie napisa³(a):
foo = [1,2,3,4]
x = foo.append(5)
print x
What will be the output (choose one):
1) [1,2,3,4]
2) [1,2,3,4,5]
3) That famous picture of Albert Einstein sticking out his tongue
4) Nothing - no output
Hi,
I am surprised that it took me so long to bloody my nose on this one.
It must be well known - and I would like to find out how well known.
So here is a CLOSED BOOK multiple choice question - no RTFM,
no playing at the interactive prompt:
Given the following three lines of code at the
On Mar 13, 8:36 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Hi,
I am surprised that it took me so long to bloody my nose on this one.
It must be well known - and I would like to find out how well known.
So here is a CLOSED BOOK multiple choice question - no RTFM,
no playing at the
Hendrik van Rooyen wrote:
I am surprised that it took me so long to bloody my nose on this one.
It must be well known - and I would like to find out how well known.
So here is a CLOSED BOOK multiple choice question - no RTFM,
no playing at the interactive prompt:
Given the following
On Mar 13, 9:36 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Hi,
I am surprised that it took me so long to bloody my nose on this one.
It must be well known - and I would like to find out how well known.
So here is a CLOSED BOOK multiple choice question - no RTFM,
no playing at the
Hendrik van Rooyen wrote:
Hi,
I am surprised that it took me so long to bloody my nose on this one.
It must be well known - and I would like to find out how well known.
So here is a CLOSED BOOK multiple choice question - no RTFM,
no playing at the interactive prompt:
Given the
Hendrik van Rooyen [EMAIL PROTECTED] writes:
Given the following three lines of code at the interactive prompt:
foo = [1,2,3,4]
x = foo.append(5)
print x
What will be the output (choose one):
4) Nothing - no output
By Python convention, methods that mutate the object return None, and
Hendrik van Rooyen a écrit :
Hi,
I am surprised that it took me so long to bloody my nose on this one.
It must be well known - and I would like to find out how well known.
So here is a CLOSED BOOK multiple choice question - no RTFM,
no playing at the interactive prompt:
Given the
Hendrik van Rooyen schreef:
So here is a CLOSED BOOK multiple choice question - no RTFM,
no playing at the interactive prompt:
Given the following three lines of code at the interactive prompt:
foo = [1,2,3,4]
x = foo.append(5)
print x
What will be the output (choose one):
1)
Paul Rubin http://[EMAIL PROTECTED] writes:
Hendrik van Rooyen [EMAIL PROTECTED] writes:
Given the following three lines of code at the interactive prompt:
foo = [1,2,3,4]
x = foo.append(5)
print x
What will be the output (choose one):
4) Nothing - no output
Correction, it
Still, I suppose this is a gotcha for a lot of people, just follow the
good advice Paul said;
By Python convention, methods that mutate the object return None, and
also stuff that returns None doesn't generate output at the
interactive prompt.
And you should survive most.
--
On Mar 13, 2:36 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Hi,
I am surprised that it took me so long to bloody my nose on this one.
It must be well known - and I would like to find out how well known.
So here is a CLOSED BOOK multiple choice question - no RTFM,
no playing at the
On Thu, Mar 13, 2008 at 8:36 AM, Hendrik van Rooyen
[EMAIL PROTECTED] wrote:
foo = [1,2,3,4]
x = foo.append(5)
print x
What will be the output (choose one):
1) [1,2,3,4]
2) [1,2,3,4,5]
3) That famous picture of Albert Einstein sticking out his tongue
4) Nothing - no output
On Mar 13, 2:36 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Hi,
I am surprised that it took me so long to bloody my nose on this one.
It must be well known - and I would like to find out how well known.
So here is a CLOSED BOOK multiple choice question - no RTFM,
no playing at the
Dustan wrote:
On Mar 13, 2:36 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Hi,
I am surprised that it took me so long to bloody my nose on this one.
It must be well known - and I would like to find out how well known.
So here is a CLOSED BOOK multiple choice question - no RTFM,
no
On Mar 13, 10:42 am, Paul Rubin http://[EMAIL PROTECTED] wrote:
[...]
By Python convention, methods that mutate the object return None, and
also stuff that returns None doesn't generate output at the
interactive prompt.
A convention that does not always hold:
l = [1, 2, 3]
l.pop()
3
l
[1,
On Mar 14, 6:13 am, Arnaud Delobelle [EMAIL PROTECTED] wrote:
On Mar 13, 10:42 am, Paul Rubin http://[EMAIL PROTECTED] wrote:
[...]
By Python convention, methods that mutate the object return None, and
also stuff that returns None doesn't generate output at the
interactive prompt.
A
Chris wrote:
No output because x is a NoneType...
That's behavior of the interactive interpreter when printing results of
expressions, not of print. It will print None.
--
Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/
San Jose, CA, USA 37 18 N 121 57 W AIM, Y!M
23 matches
Mail list logo