Joachim Durchholz wrote:
> Anton van Straaten schrieb:
>
>> Marshall wrote:
>>
>>> Can you be more explicit about what "latent types" means?
>>
>>
>> Sorry, that was a huge omission. (What I get for posting at 3:30am.)
>>
>> The short answer is that I'm most directly referring to "the types in
>
On 2006-06-26, Serge Orlov <[EMAIL PROTECTED]> wrote:
> On 25 Jun 2006 21:19:18 -0700, arvind <[EMAIL PROTECTED]> wrote:
>> I am going to work on Python 2.4.3 and MSSQL database server on
>> Windows platform.
> The module you're looking for is the first result if you search
> "python mysql" on g
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Alex Martelli) wrote:
>... let's try some google searches and see the number of million hits...:
But how reliable are those estimates of numbers of hits, anyway? More
than once I've got a page showing something like "Results 1 - 10 of
about 36
In article <[EMAIL PROTECTED]>,
Mirco Wahab <[EMAIL PROTECTED]> wrote:
>C++ programming requires you to massively invest your thinking
>first into the setup of your build environment ...
I don't understand why. It's easy enough to build small programs with a
single g++ command.
--
http://mail.
Hi !
See this shortened, simplified example. It is not working, but I don't
understand why...
# Client Process
import os, sys
from subprocess import Popen, PIPE
from time import sleep, time
from cPickle import loads, dumps
from binascii import hexlify, unhexlify
from base64 import encodestring,
MrBlueSky wrote:
> Hello! I've just finished working on my first Python app (a
> Tkinter-based program that displays the content of our application log
> files in graphical format). It was a great experience that's had a
> very positive response from my colleagues.
>
> So I'd like to try somethi
manstey wrote:
> for index in reversed(range(0,len(a)-1)):
>if '75' in b[index][1]:
> b[index][1].remove('75')
> b[index][1].append('99')
>
What on earth is all that messing around in the for loop intended to do? If
you want a range from len(a)-2 to 0 inclusive then just do it i
"Rob Thorpe" <[EMAIL PROTECTED]> writes:
>> I think statements like this are confusing, because there are
>> different interpretations of what a "value" is.
> But I mean the value as the semantics of the program itself sees it.
> Which mostly means the datum in memory.
I don't agree with that.
Richard Jones wrote:
> spiffy wrote:
>> Congrats to Seth Yastrov for 'gravity.py' ... THE ONLY ONE THAT
>> WORKED!
>
> I did test that they all worked on my machine before putting them
> online...
>
> What issues are you having? What OS?
The only issue I found is that goop dies with "IndexErro
Anton van Straaten <[EMAIL PROTECTED]> wrote:
> I'm not trying to call programmer reasoning in general a type system.
> I'd certainly agree that a programmer muddling his way through the
> development of a program, perhaps using a debugger to find all his
> problems empirically, may not be reaso
>> This allows somethings to run eg
>>
>> AxonVisualiser.py --navelgaze
>>
>> but I'm not sure if the results are really unaffected by not having a
>> real yielder. The diagram appears, but doesn't seem to settle down.
>
> I don't think the AxonVisualiser would be particularly affected by
> this -
Lawrence D'Oliveiro wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Alex Martelli) wrote:
>
>>... let's try some google searches and see the number of million
>>hits...:
>
> But how reliable are those estimates of numbers of hits, anyway? More
> than once I've got a page showing
[EMAIL PROTECTED] wrote:
> Hi, is there a way in python to place some sort of keyboard() type
> statement which stops the script and puts you back at the console? I'm
> looking for something like in matlab, where you place a keyboard()
> command (I think), then you're in debug mode in the console
[EMAIL PROTECTED] wrote:
(snip)
> Two additional questions though: 1) is there a way for a function to
> get a reference to its caller automatically (as in, without the caller
> having to pass it in)?
It's possible with sys._getframe() and a decorator - but consider it a
hack.
> and 2) what's th
Jason wrote:
> I believe what you are trying to do is something like the following.
>
> [code]
> def isIntLike(x):
> try:int(x)
> except: return False
*Never* ever use a bare except clause. *Always* specify wich exceptions
you are expecting. (NB : here, TypeError and ValueError).
Is it better to do:
message = """This is line1.
This is line2
This is line3\n"""
or
message = "This is line1.\n
message = message + "This is line2\n"
message = message + "This is line3\n"
Since the first method does not follow python's clean and easy looking
indentation structure but the seco
Harry wrote:
> Hi All,
(snip)
> I have the following object which is like a list of tuples
> row= [('name', 'x1'), ('min', 15.449041129349528), ('max',
> 991.6337818245629), ('range', 976.18474069521335), ('mean',
> 496.82174193958127), ('stddev', 304.78275004920454), ('variance',
> 92892.52472755
Hari Sekhon wrote:
> Is it better to do:
>
> message = """This is line1.
> This is line2
> This is line3\n"""
>
> or
>
> message = "This is line1.\n
> message = message + "This is line2\n"
> message = message + "This is line3\n"
Is there any reason you can't do it in one line?
message = "This is
MTD wrote:
Hari Sekhon wrote:
Is it better to do:
message = """This is line1.
This is line2
This is line3\n"""
or
message = "This is line1.\n
message = message + "This is line2\n"
message = message + "This is line3\n"
Is there any reason you can't do it in one line?
I can't give much answers, I am not that expert yet.
Bruno Desthuilliers:
> newstyle classes can do whatever oldstyle classes
> did, *and much more* (descriptors and usable
> metaclasses) - and they are somewhat faster too.
In the past I have done few tests, and it seemed that new style classes
a
Hari Sekhon wrote:
> Is it better to do:
>
> message = """This is line1.
> This is line2
> This is line3\n"""
>
> or
>
> message = "This is line1.\n
> message = message + "This is line2\n"
> message = message + "This is line3\n"
>
>
> Since the first method does not follow python's clean and easy
Frank Millman wrote:
>
> How about
>
> message = ("This is line1. "
> "This is line2 "
> "This is line3\n")
>
> The brackets mean that the lines are automatically treated as
> continuous, without the need for the ugly '\' continuation character.
>
> The
Hari Sekhon wrote:
> Is it better to do:
>
> message = """This is line1.
> This is line2
> This is line3\n"""
>
> or
>
> message = "This is line1.\n
> message = message + "This is line2\n"
> message = message + "This is line3\n"
>
>
> Since the first method does not follow python's clean and
Frank Millman wrote:
>> How about
>>
>> message = ("This is line1. "
>> "This is line2 "
>> "This is line3\n")
>>
>> The brackets mean that the lines are automatically treated as
>> continuous, without the need for the ugly '\' continuation character.
>>
Chris Smith <[EMAIL PROTECTED]> writes:
> I've since abandoned any attempt to be picky about use of the word
> "type". That was a mistake on my part. I still think it's legitimate
> to object to statements of the form "statically typed languages X, but
> dynamically typed languages Y", in whi
Fredrik Lundh wrote:
> Frank Millman wrote:
>
> >> How about
> >>
> >> message = ("This is line1. "
> >> "This is line2 "
> >> "This is line3\n")
> >>
> >> The brackets mean that the lines are automatically treated as
> >> continuous, without the need fo
Thus spoke Lawrence D'Oliveiro (on 2006-06-26 09:21):
> In article <[EMAIL PROTECTED]>,
> Mirco Wahab <[EMAIL PROTECTED]> wrote:
>
>>C++ programming requires you to massively invest your thinking
>>first into the setup of your build environment ...
>
> I don't understand why. It's easy enough t
Hari Sekhon wrote:
> Since the first method does not follow python's clean and easy looking
> indentation structure but the second just looks crude and ugly anyway.
If you want indented and pretty is important to you:
>>> from textwrap import dedent as D
>>> message = D("""\
This is
Chris Smith <[EMAIL PROTECTED]> writes:
> Joachim Durchholz <[EMAIL PROTECTED]> wrote:
>> Assume a language that
>> a) defines that a program is "type-correct" iff HM inference establishes
>> that there are no type errors
>> b) compiles a type-incorrect program anyway, with an establishes
>> rig
Hi all!
Michael Hudson wrote:
> The PyPy development team has been busy working and we've now packaged
> our latest improvements, completed work and new experiments as
> version 0.9.0, our fourth public release.
Unfortunately the download links for the release tarballs did not work
until very rec
Anton van Straaten <[EMAIL PROTECTED]> writes:
> But a program as seen by the programmer has types: the programmer
> performs (static) type inference when reasoning about the program, and
> debugs those inferences when debugging the program, finally ending up
> with a program which has a perfectly
Gabriel Dos Reis wrote:
> [EMAIL PROTECTED] writes:
>
> | think that it is too relevant for the discussion at hand. Moreover,
> | Harper talks about a relative concept of "C-safety".
>
> Then, I believe you missed the entire point.
I think the part of my reply you snipped addressed it well enoug
I can't remember the proposal number, but many of you reading will have
probably read the features that will be added to python 2.5. The actual
part I wanted to talk about was the finally part of try. Isn't it
totally defeating a compiler's job by executing the finally part even
if there is an erro
arvind wrote:
> Hi all,
> I am going to work on Python 2.4.3 and MSSQL database server on
> Windows platform.
> But I don't know how to make the connectivity or rather which module to
> import.
> I searched for the modules in the Python library, but I couldn't find
> which module to go for.
> Ple
Hi,
defcon8 wrote:
> I can't remember the proposal number, but many of you reading will have
> probably read the features that will be added to python 2.5. The actual
> part I wanted to talk about was the finally part of try. Isn't it
> totally defeating a compiler's job by executing the finally
No response yet. The SWIG test works fine in Linux no problems.
However, I still have the problem in Cygwin.
Also, not sure if related but I do have a win32 Python 2.4.3 and
Cygwin Python 2.4.1. Not sure if there are any conflicts. Any advice
in making these two co-exist?
The only C/C++ compi
Hi,
I need to re-write a VB script into Python (because I really don't like
VB).
The VB script is used to create a Windows COM object.
(I am more of Unix guy, so COM objects are a little bit alien for me).
At a certain point in the VB script, I have the following line:
objPolTypes = objPmad.Cvar
defcon8 wrote:
> I can't remember the proposal number,
http://docs.python.org/dev/whatsnew/pep-341.html
but many of you reading will have
> probably read the features that will be added to python 2.5. The actual
> part I wanted to talk about was the finally part of try.
It has been here from th
hi
is there something like an automatic debugger module available in
python? Say if i enable this auto debugger, it is able to run thru the
whole python program, print variable values at each point, or print
calls to functions..etc...just like the pdb module, but now it's
automatic.
thanks
--
htt
"defcon8" wrote:
>I can't remember the proposal number, but many of you reading will have
> probably read the features that will be added to python 2.5. The actual
> part I wanted to talk about was the finally part of try. Isn't it
> totally defeating a compiler's job by executing the finally part
Michael Yanowitz wrote:
> Also, not sure if related but I do have a win32 Python 2.4.3 and
> Cygwin Python 2.4.1. Not sure if there are any conflicts. Any advice
> in making these two co-exist?
SWIG will work with the windows and cygwin python, just make sure you
don't mix the various platforms
On 2006-06-23, Filip Wasilewski <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>
>> Logically, I should be able to enter x[-2:-0] to get the last and next to
>> last characters. However, since Python doesn't distinguish between positive
>> and negative zero, this doesn't work. Instead, I h
[EMAIL PROTECTED] writes:
> is there something like an automatic debugger module available in
> python? Say if i enable this auto debugger, it is able to run thru the
> whole python program, print variable values at each point, or print
> calls to functions..etc...just like the pdb module, but now
Bruno Desthuilliers wrote:
> [EMAIL PROTECTED] wrote:
> (snip)
>
> > Two additional questions though: 1) is there a way for a function to
> > get a reference to its caller automatically (as in, without the caller
> > having to pass it in)?
>
> It's possible with sys._getframe() and a decorator - b
When I tried to update a class's __dict__, I got an error saying that
there is no 'update' attribute for dictproxy object. What is a
dictproxy object? I thought that __dict__ is always suppose to be a, no
kidding, dictionary? Hence there should indeed be an update method.
What's this proxy business
[EMAIL PROTECTED] wrote:
> When I tried to update a class's __dict__, I got an error saying that
> there is no 'update' attribute for dictproxy object. What is a
> dictproxy object?
a CPython implementation detail, used to protect an internal data structure used
by new-style objects from unexpect
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > When I tried to update a class's __dict__, I got an error saying that
> > there is no 'update' attribute for dictproxy object. What is a
> > dictproxy object?
>
> a CPython implementation detail, used to protect an internal data structure
> us
I have had what I think is quite a nice game idea, but I don't really
have the experience or knowledge to go about it. Would anyone be
willing to start a game project? The game I am thinking about is a
virtual IRC stock exchange. There will be a bot in the channel which
gets the live stock quotes a
> But I don't know how to make the connectivity or rather which module to
> import.
Try mxODBC
http://www.egenix.com/files/python/mxODBC.html
--
http://mail.python.org/mailman/listinfo/python-list
Le lundi 26 juin 2006 16:06, [EMAIL PROTECTED] a écrit :
> Fredrik Lundh wrote:
> > [EMAIL PROTECTED] wrote:
> > > When I tried to update a class's __dict__, I got an error saying that
> > > there is no 'update' attribute for dictproxy object. What is a
> > > dictproxy object?
> >
> > a CPython imp
Hello--I'm using the threading module to accomplish some distributed processing on a project, and have a basic (I hope) question that I can't find an answer to elsewhere.I've noted that there's a lot of documentation saying that there is no external way to stop a thread, and yet when creating a thr
All right. Thanks for explaining that Maric.
Maric Michaud wrote:
> Le lundi 26 juin 2006 16:06, [EMAIL PROTECTED] a écrit :
> > Fredrik Lundh wrote:
> > > [EMAIL PROTECTED] wrote:
> > > > When I tried to update a class's __dict__, I got an error saying that
> > > > there is no 'update' attribute
"Oliver Bandel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Xah Lee wrote:
>
>>
>> As far as i know, Java and JavaScript are languages with full, complete
>> unicode support. That is, they allow names to be defined using unicode.
>
> Can you explain what you mena with the name
Is there a method or attribute I can use to get a list of classes
defined or in-use within my python program? I tried using pyclbr and
readmodule but for reason that is dogslow. Thanks in advance
DigiO
--
http://mail.python.org/mailman/listinfo/python-list
What's the best way to search a string for a particular word and get a
booleen value indicating whether it exists in the string or not?
Thanks...
--
http://mail.python.org/mailman/listinfo/python-list
Matthias Blume wrote:
> I agree with Bob Harper about safety being language-specific and all
> that. But, with all due respect, I think his characterization of C is
> not accurate.
[...]
> AFAIC, C is C-unsafe by Bob's reasoning.
Agreed.
> Of course, C can be made safe quite easily:
>
> Define
> What's the best way to search a string for a particular word and get a
> booleen value indicating whether it exists in the string or not?
>>> substring = 'foo'
>>> targetstring = 'blah foo bar'
>>> substring in targetstring
True
>>> if substring in targetstring: print 'yup'
yup
http://docs.
> > 2nd question:
> [snip]
> > if x>10 and y>10 and z>10 and summ(tritup(x,y,z)): print "OK"
>
> Others have already suggested you use the built-in sum() function.
>
> I'll suggest you don't need it at all, because it is redundant.
>
> If the sum is zero, either all three values are zero or at leas
Thankyou everyone for help last time:
The following works ok when setting a
wx.lib.buttons.GenBitmapTextButton's disabled bitmap in using wxpython
instead of this:
self.b1.SetBitmapDisabled(self.yellow)
i can use this:
aaa = 1
result1 = eval("self.b%s.SetBitmapDisabled(self.yellow)" % aaa)
resul
I thought I'd seen that somewhere! Thanks Tim. I was previously using
re.search(substring, targetstring).
Tim Chase wrote:
> > What's the best way to search a string for a particular word and get a
> > booleen value indicating whether it exists in the string or not?
>
> >>> substring = 'foo'
> >
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Alex Martelli) wrote:
>
> >... let's try some google searches and see the number of million hits...:
>
> But how reliable are those estimates of numbers of hits, anyway? More
> than once I've g
Hi all!
Michael Hudson wrote:
> The PyPy development team has been busy working and we've now packaged
> our latest improvements, completed work and new experiments as
> version 0.9.0, our fourth public release.
Unfortunately the download links for the release tarballs did not work
until very
QOTW: "In short, it's never what you think it is ;-)" - timbot,
probably on the subject of performance
"Real efficiency comes from elegant solutions, not optimized programs.
Optimization is always just a few correctness-preserving transformations
away." - Jonathan Sobel
http://www.cs.indiana.
David Hopwood <[EMAIL PROTECTED]> writes:
> Matthias Blume wrote:
>> I agree with Bob Harper about safety being language-specific and all
>> that. But, with all due respect, I think his characterization of C is
>> not accurate.
> [...]
>> AFAIC, C is C-unsafe by Bob's reasoning.
>
> Agreed.
>
>>
> Is there a method or attribute I can use to get a list of
> classes defined or in-use within my python program? I tried
> using pyclbr and readmodule but for reason that is dogslow.
Well, given that so much in python is considered a class, the
somewhat crude code below walks an object/module a
The odbc module is part of the Python Standard Library. So you can
search for docs on using it in the Python2x.chm help file (or the HTML
version of the same docs) that comes with the Windows Python
disttribution. Its quite easy to use ODBC from Python, at least for
simple tasks like "select * fro
And what if I want to search for an item in a tuple, is there a
similarly easy method?
Tim Chase wrote:
> > What's the best way to search a string for a particular word and get a
> > booleen value indicating whether it exists in the string or not?
>
> >>> substring = 'foo'
> >>> targetstring = '
Hari Sekhon wrote:
> Is it better to do:
>
> message = """This is line1.
> This is line2
> This is line3\n"""
>
> or
>
> message = "This is line1.\n
> message = message + "This is line2\n"
> message = message + "This is line3\n"
>
>
> Since the first method does not follow python's clean and e
David Hopwood <[EMAIL PROTECTED]> wrote:
> Marshall wrote:
>> David Hopwood wrote:
>>> A type system that required an annotation on all subprograms that
>>> do not provably terminate, OTOH, would not impact expressiveness
>>> at all, and would be very useful.
>> Interesting. I have always imagine
Wow, more than I had asked for, thank you Tim!
I ended up doing this:
def isClass(object):
if 'classobj' in str(type(object)):
return 1
elif "'type'" in str(type(object)):
return 1
else:
return 0
def listClasses():
classes = []
for eachobj in globals().
In article <[EMAIL PROTECTED]>,
Mirco Wahab <[EMAIL PROTECTED]> wrote:
>Thus spoke Cameron Laird (on 2006-06-25 13:08):
>
>> I'll gratuitously add that, even though I'm personally fond of
>> C++, I think teaching it as is done in colleges and high schools
>> (!) amounts to child abuse. It's wildl
Le lundi 26 juin 2006 17:25, Tim Chase a écrit :
> I couldn't find any nice
> method for determining if a variable referenced a module other
> than checking to see if that item had both a "__file__" and a
> "__name__" attribute.
Why not :
In [8]: import types, sys
In [9]: isinstance(sys, types.M
On 26 Jun 2006 08:24:54 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> And what if I want to search for an item in a tuple, is there a
> similarly easy method?
>
> Tim Chase wrote:
> > > What's the best way to search a string for a particular word and get a
> > > booleen value indicating whe
>> I couldn't find any nice method for determining if a
>> variable referenced a module other than checking to see if
>> that item had both a "__file__" and a "__name__" attribute.
>
> Why not :
>
> In [8]: import types, sys
>
> In [9]: isinstance(sys, types.ModuleType)
> Out[9]: True
Yes...this
How can an object replace itself using its own method? See the
following code:
class Mixin:
def mixin(object, *classes):
NewClass = type('Mixin', (object.__class__,) + classes, {})
newobj = NewClass()
newobj.__dict__.update(object.__dict__)
return newobj
def is
Hey, just a quick note... when I visit http://pyweek.org I get a
message that the site is not configured. www.pyweek.org works as
expected. When I received this e-mail my e-mail client made pyweek.org
clickable which is how I noticed the problem.
On 6/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> w
Thank you thank you!
Tim Williams wrote:
> On 26 Jun 2006 08:24:54 -0700, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > And what if I want to search for an item in a tuple, is there a
> > similarly easy method?
> >
> > Tim Chase wrote:
> > > > What's the best way to search a string for a part
Marshall wrote:
>
> I stand corrected: if one is using C and writing self-modifying
> code, then one *can* zip one's pants.
Static proofs notwithstanding, I'd prefer a dynamic check just prior to
this operation.
I want my code to be the only self-modifying thing around here.
--
http://mail.pyt
[EMAIL PROTECTED] wrote:
> Bruno Desthuilliers wrote:
>
>>[EMAIL PROTECTED] wrote:
(snip)
>>>and 2) what's the reason to use newstyle classes
>>>versus the old?
>>
>>All this is explained on python.org (there's a menu entry for this in
>>the documentation menu). AFAICT, newstyle classes can do wh
Le lundi 26 juin 2006 17:57, [EMAIL PROTECTED] a écrit :
> How can an object replace itself using its own method? See the
> following code:
>
> class Mixin:
> def mixin(object, *classes):
> NewClass = type('Mixin', (object.__class__,) + classes, {})
> newobj = NewClass()
>
David Hopwood wrote:
> > Joe Marshall wrote:
> >>
> >>I do this quite often. Sometimes I'll develop `in the debugger'. I'll
> >>change some piece of code and run the program until it traps. Then,
> >>without exiting the debugger, I'll fix the immediate problem and
> >>restart the program at the
[EMAIL PROTECTED] wrote:
> How can an object replace itself using its own method?
AFAIK, It can't (but I can be wrong - some guru around ?).
> See the
> following code:
>
> class Mixin:
> def mixin(object, *classes):
> NewClass = type('Mixin', (object.__class__,) + classes, {})
>
Maric Michaud wrote:
> Le lundi 26 juin 2006 17:57, [EMAIL PROTECTED] a écrit :
> > How can an object replace itself using its own method? See the
> > following code:
> >
> > class Mixin:
> > def mixin(object, *classes):
> > NewClass = type('Mixin', (object.__class__,) + classes, {})
>
Claudio Grondi wrote:
<<>>
> When necessary to skip first line _and_ indentation:
> message = """
> This is line 1
> This is line 2
> This is line 3
> """.replace('\n ', '\n')[1:] # adjust here '\n ' to indentation
Riffing on this idea:
message = """
This is line 1
I am doing alot of reading and trying to teach myself how to program.
I can not figure out how to make "Write a program that continually
reads in numbers from the user and adds them together until the sum
reaches 100." this work. If someone could show me the correct code so i
can learn from that it
Bruno Desthuilliers wrote:
> [EMAIL PROTECTED] wrote:
> > How can an object replace itself using its own method?
>
> AFAIK, It can't (but I can be wrong - some guru around ?).
>
> > ...
>
> FWIW:
> Python 2.4.3 (#1, Jun 3 2006, 17:26:11)
> [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] o
What's New?
===
The talk schedule for the Vancouver Python Workshop is now available:
http://www.vanpyz.org/conference/talkschedule.html
This years line-up might be even stronger than in 2004, so check it out!
About the Vancouver Python Workshop
===
The c
[EMAIL PROTECTED] wrote:
> I am doing alot of reading and trying to teach myself how to program.
> I can not figure out how to make "Write a program that continually
> reads in numbers from the user and adds them together until the sum
> reaches 100." this work. If someone could show me the correct
Claudio Grondi wrote:
> [EMAIL PROTECTED] wrote:
> > I am doing alot of reading and trying to teach myself how to program.
> > I can not figure out how to make "Write a program that continually
> > reads in numbers from the user and adds them together until the sum
> > reaches 100." this work. If
[EMAIL PROTECTED] wrote:
> Claudio Grondi wrote:
> > [EMAIL PROTECTED] wrote:
> > > I am doing alot of reading and trying to teach myself how to program.
> > > I can not figure out how to make "Write a program that continually
> > > reads in numbers from the user and adds them together until the s
>
> I am doing alot of reading, and the problem didnt come with an answer.
> I dont understand how to get it to continually input numbers and add
> all those together
Use while, raw_input, sys.argv[1] and int() and break the loop when the
sum is above 100.
;-)
--
http://mail.python.org/mailman/
David Hopwood wrote:
> Pascal Costanza wrote:
>> Chris Smith wrote:
>>
>>> While this effort to salvage the term "type error" in dynamic
>>> languages is interesting, I fear it will fail. Either we'll all have
>>> to admit that "type" in the dynamic sense is a psychological concept
>>> with no pre
Rune Strand wrote:
> >
> > I am doing alot of reading, and the problem didnt come with an answer.
> > I dont understand how to get it to continually input numbers and add
> > all those together
>
> Use while, raw_input, sys.argv[1] and int() and break the loop when the
> sum is above 100.
>
> ;-)
I am trying to write the following code to block up evaluation and
prompting for entering new information. However, when I break the loop
in one object and then return it does not start at the beginning again
but rather at the point where it exited. Can someone look at the
following code and give
[EMAIL PROTECTED] wrote:
> I am doing alot of reading and trying to teach myself how to program.
> I can not figure out how to make "Write a program that continually
> reads in numbers from the user and adds them together until the sum
> reaches 100." this work. If someone could show me the correct
Rune Strand wrote:
>> I am doing alot of reading, and the problem didnt come with an answer.
>> I dont understand how to get it to continually input numbers and add
>> all those together
>
> Use while, raw_input, sys.argv[1] and int() and break the loop when the
> sum is above 100.
>
> ;-)
>
I d
Bruno Desthuilliers wrote:
> [EMAIL PROTECTED] wrote:
> > Bruno Desthuilliers wrote:
> >
> >>[EMAIL PROTECTED] wrote:
> (snip)
>
> >>>and 2) what's the reason to use newstyle classes
> >>>versus the old?
> >>
> >>All this is explained on python.org (there's a menu entry for this in
> >>the documen
>>> import findertools
>>> findertools.restart()
Traceback (most recent call last):
File "", line 1, in ?
File
"/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/plat-mac/findertools.py",
line 90, in restart
finder.restart()
File
"/Library/Frameworks/Python.framework/Versio
[EMAIL PROTECTED] wrote:
> Rune Strand wrote:
> > >
> > > I am doing alot of reading, and the problem didnt come with an answer.
> > > I dont understand how to get it to continually input numbers and add
> > > all those together
> >
> > Use while, raw_input, sys.argv[1] and int() and break the loo
Rune Strand wrote:
> [EMAIL PROTECTED] wrote:
> > Rune Strand wrote:
> > > >
> > > > I am doing alot of reading, and the problem didnt come with an answer.
> > > > I dont understand how to get it to continually input numbers and add
> > > > all those together
> > >
> > > Use while, raw_input, sys.
1 - 100 of 219 matches
Mail list logo