On Fri, May 27, 2011 at 8:38 PM, Steven D'Aprano wrote:
> Not such a good analogy, since modern consumer goods are getting to the
> point where they are almost unrepairable except by replacing the control
> board. It often costs you *more* to fix a broken widget than to throw the
> machine away an
Alan Gauld wrote:
"Walter Prins" wrote
Java just isn't a hard enough language to separate great programmers
from plodders (neither is Python, for that matter) because pointers
and memory allocation are taken care of automagically.
I fundamentally disagree with his stand on this.
Not sure w
Marc Tompkins wrote:
And anyone who starts down that road will be weeded out very quickly.
Not quickly enough! They should be weeded out IN SCHOOL, or before they
even commit to a computer-science track. It's cruel to students,
inefficient for business, and disastrous for consumers if they d
"Prasad, Ramit" wrote
It is not quite the same, but there are debuggers
(not sure about for Python) that will let you change the
*in memory* value of cc on the fly.
Yes Pythons debugger can set a variable value during a
break. But the OP wanted to do it in the source file not
in memory.
"Steven D'Aprano" wrote
whrandom was deleted in Python 2.5!
Well, I'm using 2.5 but I confess I didn't try it,
I looked up my O'Reilly Python standard Library book
because I already had it to hand. It obviously predates 2.5! :-)
Alan G.
___
T
"Walter Prins" wrote
Java just isn't a hard enough language to separate great
programmers
from plodders (neither is Python, for that matter) because
pointers
and memory allocation are taken care of automagically.
I fundamentally disagree with his stand on this.
Not sure what you're saying
> I knew I could set the docstring (and played with it) but I did
> not realize that would work when the function is imported
> from a module!
You are changing the doc string of the function in the same
module, you couldn't change the docstring of a function in
another module - or at least
I knew I could set the docstring (and played with it) but I did not realize
that would work when the function is imported from a module!
Thank you,
Ramit
Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423
-
>> Does python has the ability to set cc to 34 after file
>> savings without restarting whole program?
>No, and I don;t know of any language than can unless
>you explicitly reload the code. But that is usually a
>feature of the debugger/interpreter rather
>than the language.
It is not quite the sa
On Fri, May 27, 2011 at 12:51 PM, Marc Tompkins wrote:
> That was the point that Joel and I were making. The CS programs that have
> become Java schools now make the curriculum as easy as possible because they
The concept that knowledge/ability to use a language doesn't indicate
quality is one I
On Fri, May 27, 2011 at 1:59 AM, Alan Gauld wrote:
>
> I want them to have studied the subject deeply and have a wealth of
> experience. Studying computing because its an easy option is not an option
> because its never easy.
That was the point that Joel and I were making. The CS programs that
Thanks for the detailed explanation Steve. That was very helpful.
On Fri, May 27, 2011 at 8:04 PM, Steven D'Aprano wrote:
> Válas Péter wrote:
>
>> Hi,
>> I think I am new to here, as far as I remember. :-)
>>
>> http://docs.python.org/dev/library/stdtypes.html#dict says:
>> we can create a dicti
2011/5/27 Steven D'Aprano
> Never put a lone dict literal {...} inside a call to dict(), that's just a
> waste of time. Just use the literal on its own.
>
That's what I thought about this, I just didn't want to believe that
docs.python.org wrote a redundant example.
> third_dict = dict(first_di
Válas Péter wrote:
> I think I am new to here, as far as I remember. :-)
>
> http://docs.python.org/dev/library/stdtypes.html#dict says:
> we can create a dictionary with
>
>- dict({'one': 1, 'two': 2})
>
> What is the adventage of this form to simply writing d = {'one': 1, 'two':
> 2}? Is
Nice observation Spawgi.
Sent from my BlackBerry wireless device from MTN
-Original Message-
From: spa...@gmail.com
Sender: tutor-bounces+delegbede=dudupay@python.org
Date: Fri, 27 May 2011 20:01:24
To: Válas Péter
Cc:
Subject: Re: [Tutor] Creating a dictionary
___
Hi Colin,
On 27 May 2011 14:41, col speed wrote:
> I've been learning Python on and off for the past 3 years, as a hobby.
> I am over 50 years old, so will never be a programmer. However:
>
Well just because you're 50 years old doesn't mean you will never be a
programmer ;)
> 1/ I've done a b
2011. május 27. 16:31 írta, :
> I think the way - d = dict({'one': 1, 'two': 2}) can be used to created
> dictionary using list comprehension.
> e.g.
> >>> d = dict((i,i**2) for i in range(10))
>
> I think this is not the same syntax, there are no braces in. dict({'one':
1, 'two': 2}) rather se
The first instance is more keystrokes while the second saves u that.
Sent from my BlackBerry wireless device from MTN
-Original Message-
From: Válas Péter
Sender: tutor-bounces+delegbede=dudupay@python.org
Date: Fri, 27 May 2011 16:19:08
To:
Cc:
Subject: Re: [Tutor] Creating a dict
Válas Péter wrote:
Hi,
I think I am new to here, as far as I remember. :-)
http://docs.python.org/dev/library/stdtypes.html#dict says:
we can create a dictionary with
- dict({'one': 1, 'two': 2})
What is the adventage of this form to simply writing d = {'one': 1, 'two': 2}?
Is there any dif
I think the way - d = dict({'one': 1, 'two': 2}) can be used to created
dictionary using list comprehension.
e.g.
>>> d = dict((i,i**2) for i in range(10))
>>> d
{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81}
I do not think the second approach can be used in this fashion.
>Fr
Sorry, I am afraid, I was not clear enough. So what is the difference
between
d = dict({'one': 1, 'two': 2})
and
d = {'one': 1, 'two': 2}
?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/m
The first approach does not really give you any variable (in easy form) to
operate upon.
The second approach returns a dict object that you can later reuse in easier
form. So one advantage is certainly that ease of object reuse and also
object modification.
If you want to add, remove, update anythi
Hi,
I think I am new to here, as far as I remember. :-)
http://docs.python.org/dev/library/stdtypes.html#dict says:
we can create a dictionary with
- dict({'one': 1, 'two': 2})
What is the adventage of this form to simply writing d = {'one': 1, 'two': 2}?
Is there any difference?
Thanks
On 27 May 2011 17:31, Walter Prins wrote:
>
>
> I find this thread very interesting.
>
I've been learning Python on and off for the past 3 years, as a hobby.
I am over 50 years old, so will never be a programmer. However:
1/ I've done a bit in Project Euler and have found many algorithms to get
Rachel-Mikel ArceJaeger wrote:
Hello,
I am having trouble with determining when python is passing by reference and by
value
Others have already discussed this, but at the risk of blowing my own
trumpet, I'd like to point you at an earlier discussion on this list:
http://mail.python.org/pi
On Thu, 26 May 2011 12:16:05 am Bryton wrote:
> Is anyone having a step by step tutorial of cherrypy(or book title).I
> have used the tutorial in their site as well as the book (cherrypy
> essentials) and I would like to have a one that is a bit more step by
> step...Please help...
Sorry Bryton, I
Thank you all for the replies. They helped me a lot.
Have a great weekend!
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Thu, 26 May 2011 05:45:30 am Alan Gauld wrote:
[...]
> using
> the choice() function from the whrandom module.
>
> passwd = [whrandom.choice(series) for n in range(p)]
whrandom was deleted in Python 2.5! I'm not sure when it was formally
deprecated, but the recommended way of getting random n
On 27 May 2011 09:59, Alan Gauld wrote:
> "Marc Tompkins" wrote
>
>> Java just isn't a hard enough language to separate great programmers
>>
>> from plodders (neither is Python, for that matter) because pointers
>> and memory allocation are taken care of automagically.
>>
>
> I fundamentally dis
May I direct the interview question to another direction?
are there some tests (I mean, just like the examination test) of
python for beginner?
which asked some basic but important questions (I do not want to learn
python all of the stuff, it might be so huge for me.)
and most important those pra
"Alan Gauld" wrote
of the term. The issue is about whether the programmer was
trained in computing/engineering or whether it was someone
who just knew a programming language.
And I meant to add that this includes learning about the
virtual machine - the execution environment, the differen
wrote
Hi, guys. Here is a demo program like this:
aa = 3
bb = 4
cc = 53
dd = 6
print cc
I put a breakpoint at the first line, then debug the program.
After 'aa' is set to '3', I modify '53' in the 3rd line to '34',
then
save the source file and run remain codes. As expected,
the output is '5
"Marc Tompkins" wrote
Java just isn't a hard enough language to separate great programmers
from plodders (neither is Python, for that matter) because pointers
and memory allocation are taken care of automagically.
I fundamentally disagree with his stand on this.
When you're hiring programmer
33 matches
Mail list logo