Re: why memoizing is faster

2011-03-25 Thread Terry Reedy
up time of repeated calls represents the actual post-initialization burden on that program. If one want to measure the initialization time, then the cache can easily be restarted with each call (once one knows how): fib_iter(100,_cache=[0,1]) -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.7.1 "serial" vs "pyserial"

2011-03-25 Thread Terry Reedy
ts" Actual code and traceback may help anyone to respond. However lots of scripts "import serial" and then "ser.readline(size=None, eol=chr(13))" This would not execute. Did you mean serial.readline...? -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: why memoizing is faster

2011-03-25 Thread Terry Reedy
Good point. If one does fib(1) and wants to dump the cache without dumping all references to the function object, one can currently do fib_iter.__kwdefaults__['_cache'] = [0,1] to truly reset the cache, at least with CPython. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: why memoizing is faster

2011-03-26 Thread Terry Reedy
On 3/26/2011 5:55 AM, Lie wrote: On Mar 26, 5:10 pm, Terry Reedy wrote: On 3/26/2011 12:17 AM, Stefan Behnel wrote: Not "restarted" in the sense that it gets cleaned up, though. The above simply passes an explicit value for it that will be used for the single call. Which satisfie

Re: why memoizing is faster

2011-03-26 Thread Terry Reedy
ib_iter.__kwdefaults__['_cache'] = [0,1] The point of this might be to free a cache swollen by a one-time call with a large n, without deleting the function itself. One could then continue with calls using normal-sized ints. Caching is a time-space tradeoff that might need tuning to a

Re: Guido rethinking removal of cmp from sort method

2011-03-26 Thread Terry Reedy
vert." Don't shoot the messenger. And what point would that be? That you like Python and want to see it improved even further, as do I ;-). -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: why memoizing is faster

2011-03-26 Thread Terry Reedy
ting exact equality theorems or searching for a new one, exact values are necessary. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-03-29 Thread Terry Reedy
a discussion of the meaning of 'reasonably' in this particular case. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python3 Tkinter difficulty

2011-03-29 Thread Terry Reedy
ed without causing other problems. Can 8.4 and 8.5 be installed together without problem? Does it really matter which of these I use for the purpose of python build? If I have TclTk 8.5 installed should I only download the 8.5 tk-dev package? I would start with that and then make that work. -- Terry

Re: Fun python 3.2 one-liner

2011-03-29 Thread Terry Reedy
28: ** 29: 30: 31: ***** 32: *** 33: * 34: 35: 36: 37: 38: 39: 40: -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: delete namespaces

2011-03-29 Thread Terry Reedy
develop banner.py with adequate tests, you will want to restart the test anyway, and you should not need to modify much thereafter. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: delete namespaces

2011-03-30 Thread Terry Reedy
hold the previous code. "reload" solves some problems, but bring others, especially for the newcomer. Guido removed it in 3.x because it is badly flawed and he could see any way to sensibly fix it. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Terry Reedy
On 3/30/2011 7:58 PM, Gnarlodious wrote: On Mar 30, 9:28 am, Peter Otten wrote: You are trying to run your 3.x code with Python 2.x... You're right. Exactly why this started happening I don't know. I believe recent Mac OSX comes with some 2.x installed as the default Python.

Re: Guido rethinking removal of cmp from sort method

2011-03-31 Thread Terry Reedy
ns have already made it the default. Others have and will hold back. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: a basic bytecode to machine code compiler

2011-03-31 Thread Terry Reedy
n, use) or usefulness to others. For the latter, you *might* do better to help with an existing project, such as Cython or Dufour's ShedSkin. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting subsequences composed of the same character

2011-03-31 Thread Terry Reedy
7;' Or, if you want to do it with itertools instead of the "re" module: >>> s = "pyyythhooonnn ---> " >>> from itertools import groupby >>> [c*length for c, length in ((k, len(list(g))) for k, g in groupby(s)) if length > 1] ['yy

Re: Guido rethinking removal of cmp from sort method

2011-04-01 Thread Terry Reedy
moved, some other change would have been the worst in this respect, and possibly the subject of a thread like this. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-04-01 Thread Terry Reedy
zen. Even bug fixes change a defacto interface. If you want frozon, stick with one particular release. There are lots available. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-04-01 Thread Terry Reedy
happy? 2to3 could probably gain a fixer to change .sort(cmp=f) # to import functools import cmp_to_key .sort(key=functools.cmp_to_key(f)) I know some would not like this because interface change is not their real concern. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-04-01 Thread Terry Reedy
On 4/1/2011 2:44 AM, harrismh777 wrote: Terry Reedy wrote: Python 3 was announced and as a mildly code breaking version at least 5 years before it came out. I appreciate the spirit of your arguments overall, and I do not necessarily disagree with much of what you are saying. I would like to

Re: Guido rethinking removal of cmp from sort method

2011-04-01 Thread Terry Reedy
benefits, especially in the future, in addition to current costs. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling python without ssl?

2011-04-01 Thread Terry Reedy
On 4/1/2011 7:36 AM, Austin Bingham wrote: Is there any way to compile python (3.1.3, in case it matters) without ssl support? OpenSSL is on my system, and configure finds it, Can you temporarily disguise (rename) it? -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematical Operations on Array

2011-04-01 Thread Terry Reedy
scalars This does not say where in the expression the problem arose. to be sure a = float(data([:,0]) b = acod(a) c = degrees(b) Can anyone tell me what I am doing wrong? Numpy questions get better answers on the numpy list where numpy experts hang out. -- Terry Jan Reedy -- http://mai

Re: Mathematical Operations on Array

2011-04-01 Thread Terry Reedy
down the list. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: The Magick of __call__ (Or, Digging Deeper Than I Ought To)

2011-04-01 Thread Terry Reedy
created. Why? 1. If you want to reuse a bound methods, just bind it to a name or something and reuse it. 2. To automatically keep it for possible reuse, which normally is not too common, it wold have to be kept in some hidden dict which would grow indefinitely unless pruned occasionally. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-04-01 Thread Terry Reedy
ment into the output code, when it does that particular transformation, since most of the time there's probably a better way to write the key function. rewriting cmp_to_key in C is underway http://bugs.python.org/issue11707 -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-04-02 Thread Terry Reedy
f int.__div__(a,b)). I suggested that the first version in which the old meaning was dropped should be called 3.0 to *signify that there would be some breakage of 2.x code*. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: proposal to allow to set the delimiter in str.format to something other than curly bracket

2011-04-03 Thread Terry Reedy
;class {0}Model { public bool IsModel(){ return true; } }" In [2]: code.format('My') Just double the brackets, just as one doubles '\\' to get '\' in a string. >>> "class {0}Model {{ public bool IsModel(){{ returntrue; }} }}".format('My')

Re: Guido rethinking removal of cmp from sort method

2011-04-03 Thread Terry Reedy
college CS/programming courses. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: integer multiplication

2011-04-04 Thread Terry Reedy
from >Python. In crypto code (lots of 1024 bit modular exponentials) I think >I found gmpy to be around 4x faster than Python longs. For specialized use, specialized gmpy is the way to go. I am curious how gmpy compares to 3.x ints (longs) with small number calculations like 3+5 or 3*5.

Re: Python CPU

2011-04-04 Thread Terry Reedy
like strings and bytes have. Array comes with a few, but very few, generic sequence methods, like .count(x) (a special-case of reduction). -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-04-04 Thread Terry Reedy
On 4/4/2011 5:34 AM, Antoon Pardon wrote: On Fri, Apr 01, 2011 at 10:21:33PM -0400, Terry Reedy wrote: rewriting cmp_to_key in C is underway http://bugs.python.org/issue11707 Nice to know! Any chance this wil get into 2.7.x? I posted the question to the issue. -- Terry Jan Reedy -- http

Re: Guido rethinking removal of cmp from sort method

2011-04-04 Thread Terry Reedy
On 4/4/2011 9:35 AM, Lie Ryan wrote: On 04/04/11 19:34, Antoon Pardon wrote: On Fri, Apr 01, 2011 at 10:21:33PM -0400, Terry Reedy wrote: rewriting cmp_to_key in C is underway http://bugs.python.org/issue11707 Nice to know! Any chance this wil get into 2.7.x? Python 2.7 still have

Re: Python CPU

2011-04-04 Thread Terry Reedy
On 4/4/2011 1:14 PM, Terry Reedy wrote: On 4/4/2011 5:23 AM, Paul Rubin wrote: Gregory Ewing writes: What might help more is having bytecodes that operate on arrays of unboxed types -- numpy acceleration in hardware. That is an interesting idea as an array or functools module patch

Re: integer multiplication

2011-04-04 Thread Terry Reedy
On 4/4/2011 1:20 PM, geremy condra wrote: On Mon, Apr 4, 2011 at 9:41 AM, Terry Reedy wrote: (I believe that retaining two implementations internally was considered but rejected. Could be wrong.) There are two implementations, grade school multiplication and karatsuba, which kicks in after

Re: Guido rethinking removal of cmp from sort method

2011-04-04 Thread Terry Reedy
O fix exactly, and there is always worry that permanance enhancements may have unforseen side effects. I will let Raymond make the call on this. /permanance/performance/, /unforseen/unforeseen/ -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-04-04 Thread Terry Reedy
ve had the same idea, so naturally I agree ;-). I might even work on it eventually. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: is python 3 better than python 2?

2011-04-05 Thread Terry Reedy
uming equal library availability, absolutely. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggest some exercises on Python

2011-04-05 Thread Terry Reedy
he web. Write something to fetch a page (from python.org, say) and do something with it. Try filling out the search form at bugs.python.org and extracting the data table from the response page. Etc. Suppose you are even move interested in xyz. <here>> -- Terry Jan Reedy -- http://m

Re: is python 3 better than python 2?

2011-04-05 Thread Terry Reedy
. Yes and no. They were kept slightly modified as bytes, with all of the string methods kept. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: is python 3 better than python 2?

2011-04-06 Thread Terry Reedy
b/c'.split(b'/') [b'a', b'b', b'c'] One change in 3.x is the elimination of automatic coercions between bytes and (unicode) strings. 'a/b/c'.split(b'/') # TypeError: Can't convert 'bytes' object to str implicitly -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: iterable argument required

2011-04-06 Thread Terry Reedy
testing against each is different: a is None; a is not None a == ''; a != '' -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Is the function filter deprecated?

2011-04-06 Thread Terry Reedy
ier and to me clearer. If you do not have a filter function, but only an expression, and would not use it again, then (x for x in seq if expr) is faster and to me easier and clearer than filter(lambda x: expr, seq) Feel free to take your pick unless part of a group with code guidelines. -- Te

Re: Trapping the segfault of a subprocess.Popen

2011-04-06 Thread Terry Reedy
, but Victor Stinner has added a new module to Python 3.3 that tries to catch segfaults and other fatal signals and produce a traceback before Python disappears. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Generators and propagation of exceptions

2011-04-08 Thread Terry Reedy
t the exception inside the loop, it will break the for loop and close the generator. So the error no longer affects a single token/expression but it kills the whole session. I guess that's because the direction flow of control is sort of orthogonal to the direction of flow of data. -- Te

Re: Retrieving Python Keywords

2011-04-09 Thread Terry Reedy
On 4/9/2011 9:28 PM, candide wrote: Python is very good at introspection, so I was wondering if Python (2.7) provides any feature to retrieve the list of its keywords (and, as, assert, break, ...). Yes. (Look in the manuals, or try the obvious imports ;-) -- Terry Jan Reedy -- http

Re: Retrieving Python Keywords

2011-04-10 Thread Terry Reedy
On 4/10/2011 5:12 AM, candide wrote: Le 10/04/2011 04:01, Terry Reedy a écrit : Yes. (Look in the manuals, I did : my main reference book is the Martelli's /Python in a Nutshell/ You should only use that as a supplement. and the index doesn't refer to the keyword import a

Re: Feature suggestion: math.zod for painlessly avoiding ZeroDivisionError

2011-04-11 Thread Terry Reedy
will be faster than 'stat = zod(x,y)', which does the same thing but adds a function call/ -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Dump interpreter history?

2011-04-11 Thread Terry Reedy
dy tried to get what you want, and now you just need to gussy it up in an editor. I've never used it myself, but IIRC ipython does what you want very nicely. Idle will save the contents of the shell window, including opening slash line and prompts. -- Terry Jan Reedy -- http://mail.py

Re: Free software versus software idea patents

2011-04-12 Thread Terry Reedy
uring machines' (PTMs, section 6.2), except that iterators (and generators by default) operate in 'pull' mode, while they describe PTMs as operating in 'push' mode (as with generator.send()). -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Free software versus software idea patents

2011-04-12 Thread Terry Reedy
legal brief, without possibly having to pay royalties or violate a patent. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Dump interpreter history?

2011-04-12 Thread Terry Reedy
On 4/12/2011 12:12 PM, Aahz wrote: In article, Terry Reedy wrote: Idle will save the contents of the shell window, including opening slash line and prompts. The problem is that normally you *don't* want the prompts. I believe IPython handles that. I have already had in mind that

Re: Feature suggestion -- return if true

2011-04-12 Thread Terry Reedy
ollow his advice and repost this to the python-ideas list instead. I would not. I am 99.99% sure both the syntax (introducing '?') and the idea will be rejected. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Free software versus software idea patents

2011-04-12 Thread Terry Reedy
On 4/12/2011 2:44 PM, Dan Stromberg wrote: On Tue, Apr 12, 2011 at 10:32 AM, Terry Reedy wrote: On 4/11/2011 4:36 AM, rusi wrote: http://www.cse.uconn.edu/~dqg/papers/cie05.pdf may be of interest (and also other papers of Peter Wegner questioning the universality of Turing machines lambda

Re: Testing changes to Python code on the fly: reload() + alternatives?

2011-04-12 Thread Terry Reedy
o go about testing changes to code Restart from the beginning. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Egos, heartlessness, and limitations

2011-04-13 Thread Terry Reedy
verage of 4 per day. I suspect the average time for each is at least an hour. When I get up to speed with hg and start contributing again, I will spend less time here. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: memory usage multi value hash

2011-04-14 Thread Terry Reedy
as outstream: csv.writer(outstream).writerows(d.itervalues()) -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: [Q] ipython: Multiple commands on the same line and newlines

2011-04-16 Thread Terry Reedy
ment while x< 10: x = x + 1; This is another. I can understanding wanting to rerun initialized loops with one enter, but you cannot. Sorry. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE/text-editor

2011-04-16 Thread Terry Reedy
On 4/16/2011 3:03 AM, Alec Taylor wrote: IDLE loses syntax highlighting annoyingly often Could you exlain? When does it do that with a file labelled .py? -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Python 2.5.6 Release Candidate 1

2011-04-18 Thread Terry Reedy
aries are a lot of work. B. Security releases are primarily for servers. C. Security releases after bugfix is over is better than nothing (the old policy before 2.5). D. You are welcome to pay someone to produce one for you. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE bug

2011-04-19 Thread Terry Reedy
tracker. If one is new to Python and perhaps not sure, or should not be sure, then I prefer that one ask here for a second opinion. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

3.2 test failures on Centos 5.6 (was Re: Noob Question)

2011-04-19 Thread Terry Reedy
so, please advise the appropriate group. Right place to start. If there are Centos specific issues, you might want to look for a Centos list. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Namespaces in functions vs classes

2011-04-19 Thread Terry Reedy
*not* equivalent a = 'out' class C: a = 'in' def f(x=a): print(x) C.f() # prints 'in' a = 'out' class C: a = 'in' def f(x=a): print(x) C.f = f C.f() # prints 'out' -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: What breaks if I remove lib/python2.7/test/* ?

2011-04-19 Thread Terry Reedy
code. Otherwise, delete it. It is 26MB for me. 11 mb on windows, which is still sizable in some contexts. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: 3.2 test failures on Centos 5.6 (was Re: Noob Question)

2011-04-19 Thread Terry Reedy
On 4/19/2011 1:33 PM, Rob McGillivray wrote: I am trying to install from an RPM downloaded from python.org. That puzzles me. For *nix, I do not see .rpm, just tarballs, on http://python.org/download/releases/3.2/ -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE bug

2011-04-19 Thread Terry Reedy
On 4/19/2011 11:39 PM, harrismh777 wrote: Terry Reedy wrote: If one is new to Python and perhaps not sure, or should not be sure, then I prefer that one ask here for a second opinion. Thanks Terry. I am not new to Python, but I am new to Python3, and I'm also relatively new to IDLE. Typi

Re: Teaching Python

2011-04-20 Thread Terry Reedy
ly impenetrable jungle for a month to arrive at the well-hidden ancient temple. Since it was itself covered in overgrowth, he hacked away another month to reveal it in its ancient glory." Make the appropriate substution of code jungles and hard-won prize. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: learnpython.org - an online interactive Python tutorial

2011-04-20 Thread Terry Reedy
On 4/20/2011 1:15 PM, Ron wrote: I've written an online interactive Python tutorial atop Google App Engine: http://www.learnpython.org. Currently giving 500 server error. Hope something clears up. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 on CentOS 5.6 & compatibility concerns

2011-04-21 Thread Terry Reedy
lly? that is ancient!). -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: A question about Python Classes

2011-04-21 Thread Terry Reedy
ind-the-scenes implementation details like 'method_wrapper' and 'slot_wrapper' classes, which may be CPython specific. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Snowball to Python compiler

2011-04-21 Thread Terry Reedy
e to write the interface in Python with ctypes. than translating snowball to Python, which will be dog slow to interpret. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Closing generators

2011-04-21 Thread Terry Reedy
returning from the function, g, if local, should disappear. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Closing generators

2011-04-22 Thread Terry Reedy
On 4/22/2011 4:01 AM, Thomas Rachel wrote: Am 22.04.2011 09:01, schrieb Wolfgang Rohdewald: On Freitag 22 April 2011, Terry Reedy wrote: When returning from the function, g, if local, should disappear. yes - it disappears in the sense that it no longer accessible, but AFAIK python makes

Re: Function __defaults__

2011-04-24 Thread Terry Reedy
sting question. It seems not to be documented, so I would not count on anything. This is a bit of a gray area, and if you get no answer here, try pydev list, perhaps as a request that special names be more completely documented, even is just as implementation details subject to change. -- Terr

Re: Function __defaults__

2011-04-24 Thread Terry Reedy
fault value Writable" So if the following does not work in Jython 2.5 def f(a=42) : return a f() # 42 f.func_defaults = (23,) f() # 23 then it *does* have a bug with respect to matching the Python 2.5 spec. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: learnpython.org - an online interactive Python tutorial

2011-04-25 Thread Terry Reedy
n exception if the input cannot be type cast to int? Converted (not cast) to int or float or complex or anything else other than strl. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: How to concatenate unicode strings ???

2011-04-26 Thread Terry Reedy
r Unicode string literals: u'this an example language ' + u'español' You'll probably also need to add the appropriate source file encoding declaration; see http://www.python.org/dev/peps/pep-0263/ Or use Python 3 -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Terrible FPU performance

2011-04-26 Thread Terry Reedy
dition commented out and about 4 when included as above, which is about what I would expect. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Have you read the Python docs lately?

2011-04-28 Thread Terry Reedy
months to improve the tests, code, and docs. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE lost from Windows menu !

2011-04-28 Thread Terry Reedy
s. I have forgotten how to find it in xp, and no idea in w7. I would look in windows help and or control panel. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: NaN

2011-04-28 Thread Terry Reedy
g was once standard for Fortran programs. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 Tkinter and TTK

2011-04-28 Thread Terry Reedy
Docs web site. Only errors from there. Syntax error? Runtime exception? or just not look/act as you expect? -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python wide-python-build unicode for Windows

2011-04-29 Thread Terry Reedy
le a bug report requesting a workaround in the 2.x version. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python competitions and learnings

2011-04-30 Thread Terry Reedy
m in the arena. " "By the result of competition formed top of the game. " This is unclear. perhaps "The best will be chosen by the result of the competition." I see a mailto: link at the bottom of the page, so I will report anything else I see later. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-01 Thread Terry Reedy
ther than as just a linear-memory machine language. A linear memory with bytes addressed from 0 to max-int or max-long is an explicit part of the definition of assembly languages and C. It is no part of the definition of Python. Nice begin-a-thread post. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Fibonacci series recursion error

2011-05-01 Thread Terry Reedy
usually and at most one recursive call per call * binary recursion: usually and at most two recursive calls per call Fib is the best known example. * tail recursion: base cases return completed calculations * body recursion: base cases return starting values, often constants -- Terr

Re: Python competitions and learnings

2011-05-01 Thread Terry Reedy
On 5/1/2011 12:49 PM, Alexander Lyabah wrote: And what do you think about Score Games and competitions? The rules of the first score game were not clear to me. I could not figure out how to play it interactively myself so I could see how it actually played. -- Terry Jan Reedy -- http

Re: What other languages use the same data model as Python?

2011-05-01 Thread Terry Reedy
rectly'? Surely not. Using 'name' rather than the hugely overloaded tern 'variable' automatically avoids certain misunderstandings. A good summary might be "Python manipulates objects that are accessed through literals, names, and expressions." -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Fibonacci series recursion error

2011-05-01 Thread Terry Reedy
in the unbalanced tree generated by the recursion. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL Question

2011-05-01 Thread Terry Reedy
this gives two different answers in the two cases noted above. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Fibonacci series recursion error

2011-05-02 Thread Terry Reedy
On 5/2/2011 9:14 AM, Hans Georg Schaathun wrote: On Sun, 01 May 2011 18:24:30 -0400, Terry Reedy : Python does not do this automatically because 1) it can be a semantic : change under some circumstances; 2) one who wants the iterative version : can just as easily write it directly; That&#

Re: Coolest Python recipe of all time

2011-05-02 Thread Terry Reedy
(= 0 implied). -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Coolest Python recipe of all time

2011-05-03 Thread Terry Reedy
On 5/3/2011 2:29 AM, Gregory Ewing wrote: Terry Reedy wrote: The trick is that replacing x with j and evaluating therefore causes (in Python) all the coefficients of x (now j) to be added together separately from all the constant terms to reduce the linear equation to a*x+b (= 0 implied

Re: Why do directly imported variables behave differently than those attached to imported module?

2011-05-03 Thread Terry Reedy
foo import var as rav', then perhaps you would not have been so surprised that __main__.rav and foo.var have independent fates. You have discovered that using from x import * is a bad idea when module x has global names that get rebound. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: A very minute correction on PDF

2011-05-04 Thread Terry Reedy
chapter only uses the simplest form of the print statement. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: [ann] pyjamas 0.8alpha1 release

2011-05-04 Thread Terry Reedy
ir desktop, give to friends to run in a browser, and run on their phones. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Hooking into Python's memory management

2011-05-04 Thread Terry Reedy
object's id() to the list would also suffice. In either case, if such a module is possible, any pointers you could provide regarding how to implement such a module would be appreciated. I hope the above helps. I think Python is a great learning language. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic interaction with another program

2011-05-04 Thread Terry Reedy
example, I only need to tell it: L u 100 u You should be able to send this through a pipe connected to the subprocess. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Today's fun and educational Python recipe

2011-05-04 Thread Terry Reedy
initial value; or add (or append) these values to the key." I do not see the code doing either of these. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Today's fun and educational Python recipe

2011-05-04 Thread Terry Reedy
the lengths of the state names. But an average of 5/10 false positives in 5 runs is good. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

<    6   7   8   9   10   11   12   13   14   15   >