[Python-Dev] Re: Rewriting PEP4

2004-12-07 Thread Terry Reedy
Martin v. Löwis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] As a (currently) casual user of Python, this is my view of the standard library dilemma and its solution: 1. It is too small: I may someday want to use a module not yet added. 2. It is too big: I cannot keep everything

[Python-Dev] Re: Re: Re: 2.4 news reaches interesting places

2004-12-15 Thread Terry Reedy
For a subsite aimed at businesses, business.python.org is obvious and easily remembered. Not all businesses are corporations. 'about' and 'why' are not specific at all. I think such a subsite, linked from the main site also, would be a good idea. It should explain both why (including

[Python-Dev] Re: Python in education

2004-12-15 Thread Terry Reedy
Randy Chung [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi everyone, I'm going to be leading a class on Python at the University of California, Berkeley next semester (starting in January). Great. I'm interested in using actual bugs in Python as exercises Please consider

[Python-Dev] Re: proto-pep: How to change Python's bytecode

2004-12-24 Thread Terry Reedy
Brett C. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] At to the title, bytecodes are a property of the CPython implementation, not of Python itself. Since I think the distinction is quite important to maintain, I would insert the missing 'C' and everywhere else as appropriate.

[Python-Dev] Re: Re: PEP 246: LiskovViolation as a name

2005-01-15 Thread Terry Reedy
Skip Montanaro [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The first example here: http://www.compulink.co.uk/~querrid/STANDARD/lsp.htm Looks pretty un-extreme to me. To both summarize and flesh out the square-rectangle example: Q. Is a square 'properly' a rectangle? A.

[Python-Dev] Re: Getting rid of unbound methods: patch available

2005-01-16 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What do people think? (My main motivation for this, as stated before, is that it adds complexity without much benefit.) From the viewpoint of learning and explaining Python, this is a plus. I never understood why

[Python-Dev] Re: PyCon: The Spam Continues ;-)

2005-01-24 Thread Terry Reedy
http://aspn.activestate.com/ASPN/Mail/Browse/ByAuthor/python-dev?author=cHljb25AcHl0aG9uLm9yZw--Huh? I get a mostly blank page. Perhaps there are no authors by thatname.tjr ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] Re: Is msvcr71.dll re-redistributable?

2005-02-02 Thread Terry Reedy
Phillip J. Eby [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] So, in an amusing turn of events, the EULA actually appears to forbid the current offering of Python for Windows, since it does not have such a EULA. Except of course that MS gave Python developers several copies of

[Python-Dev] Re: license issues with profiler.py and md5.h/md5c.c

2005-02-12 Thread Terry Reedy
Martin v. Löwis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] http://www.python.org/psf/contrib.html After reading this page and pages linked thereto, I get the impression that you are only asking for contributor forms from contributors of original material (such as module or

[Python-Dev] Re: Confusing hasattr behaviour

2005-02-24 Thread Terry Reedy
J. David Ibanez [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Given that the behavior of hasattr is clearly defined in Lib Manual 2.1 as equivalent to def hasattr(obj, name): try: getattr(obj, name) return True except: return False I am not sure what could be

[Python-Dev] Re: Rationale for sum()'s design?

2005-03-15 Thread Terry Reedy
Michael Chermside [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Tim writes: I'd personally be delighted if sum() never worked on anything other than numbers. Guido writes: I think the conclusion should be that sum() is sufficiently constrained by backwards compatibility to

[Python-Dev] Re: Ye don't be needin' these!

2005-03-23 Thread Terry Reedy
Herman Toothrot [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Avast! Why be there builtins divmod and pow, when operators **, /, and % should be good enough for ya? It runs counter to TOOWTDI, I be thinking. Questions like this should be asked on comp.lang.python or the python

[Python-Dev] Re: C API for the bool type?

2005-03-23 Thread Terry Reedy
Bo Thorsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If this is not the correct place to post this problem, I apologize. In that case, please be gentle and point me to a better mailing list. The general Python mailing list (pyrhon-list ?) also at python.org. Or

[Python-Dev] Re: tree data structure and python

2005-03-25 Thread Terry Reedy
vivek khurana [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i am a new member on this list. I have to implement tree data structure using python. How it can be done in python. Is there an existing data structure which can be used as tree? I have searched archives and manuals but

[Python-Dev] Re: comprehension abbreviation (was: Adding any() andall())

2005-03-29 Thread Terry Reedy
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Having to write [x for x in seq] to produce a copy of a list doesn't seem that outrageous to me, Except for (currently) leaving the last value of sequence bound to 'x' after making the copy, how is the above

[Python-Dev] Re: python-dev Summary for 2005-03-16 through 2005-03-31[draft]

2005-04-01 Thread Terry Reedy
This led to a much more fleshed out design document (found in Python/compile.txt in the AST branch), The directory URL http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Python/?only_with_tag=ast-branch or even the file URL

[Python-Dev] Re: Re: anonymous blocks

2005-04-25 Thread Terry Reedy
Skip Montanaro [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Guido with VAR = EXPR: Guido BODY What about a multi-variable case? Will you have to introduce a new level of indentation for each 'with' var? I would expect to see the same structure unpacking as

[Python-Dev] Re: Re: anonymous blocks

2005-04-25 Thread Terry Reedy
Brett C. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] And before anyone decries the fact that this might confuse a newbie (which seems to happen with every advanced feature ever dreamed up), remember this will not be meant for a newbie but for someone who has experience in

[Python-Dev] Re: Re: Caching objects in memory

2005-04-25 Thread Terry Reedy
Guido: But for *immutable* objects (like numbers, strings and tuples) the implementation is free to use caching. In practice, I believe ints between -5 and 100 are cached, and 1-character strings are often cached (but not always). Hope this helps! I would think this is in the docs somewhere but

[Python-Dev] Re: Re: Re: anonymous blocks

2005-04-26 Thread Terry Reedy
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Terry Reedy wrote: The part you quoted was by Nick Coghlan, not me, as indicated by the (now ) instead of (which would now be ) in front of the lines. Not supporting iterables makes it harder to write a class which

[Python-Dev] Re: a few SF bugs which can (probably) be closed

2005-04-26 Thread Terry Reedy
Ilya Sandler [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Here a few sourceforge bugs which can probably be closed: [ 1168983 ] : ftplib.py string index out of range Original poster reports that the problem disappeared after a patch committed by Raymond Not clear to me if this

Re: [Python-Dev] Loading compiled modules under MSYS/MingGW?

2005-05-15 Thread Terry Reedy
Steve Castellotti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Simple question. I'm working on getting Python [2.3] support enabled for the Gimp under Win32. ... Am I missing something obvious? Is this a question better suited to MinGW/MSYS mailing lists, or perhaps the

Re: [Python-Dev] Localized Type Inference of Atomic Types in Python

2005-05-24 Thread Terry Reedy
Brett C. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] My thesis, Localized Type Inference of Atomic Types in Python, was successfully defended today for my MS in Computer Science at the California Polytechnic State University, San Luis Obispo. Woo hoo. Congratulations. Terry

Re: [Python-Dev] [ANN] Have fun programming with your kids

2005-06-12 Thread Terry Reedy
Dear Mr. Ducasse, The PyDev mailing list, bidirectionally gatewayed to gmane.comp.python.devel, which you apparently used as the insertion point, is a specialized list for discussion and development of the next Python version and occasionally beyond. Even most posts to comp.lang.python (==

Re: [Python-Dev] getch() in msvcrt does not accept extended characters.

2005-07-01 Thread Terry Reedy
Darryl Dixon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Python on Windows. The Python interface to this function is in the C code in msvcrtmodule.c, which has a (very thin) wrapper around the raw OS system call. I think Fredrik made two points in this regard. 1) The current

Re: [Python-Dev] reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-02 Thread Terry Reedy
Ralf W. Grosse-Kunstleve [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'd also be happy with def __init__(self, self.x, self.y, self.z): which wouldn't be too different from unpacking tuples If you are willing to require that the args be passed as a tuple (extra pair

Re: [Python-Dev] Terminology for PEP 343

2005-07-03 Thread Terry Reedy
Michael Hudson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thing is, there may be no resource; in my talk at EuroPython: http://starship.python.net/crew/mwh/recexc.pdf I used a with statement to establish and dis-establish an error handler -- would you call that a

Re: [Python-Dev] Triple-quoted strings and indentation

2005-07-05 Thread Terry Reedy
Andrew Durdin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In general, I find triple-quoted strings to be very handy, particularly for standalone scripts. However, the fact that they have to be written in the left-hand column to avoid leading whitespace really grates,

Re: [Python-Dev] Triple-quoted strings and indentation

2005-07-06 Thread Terry Reedy
Andrew Durdin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In general, I find triple-quoted strings to be very handy, particularly for standalone scripts. However, the fact that they have to be written in the left-hand column to avoid leading whitespace really grates,

Re: [Python-Dev] 'With' context documentation draft (was Re: Terminology for PEP 343

2005-07-08 Thread Terry Reedy
Nick Coghlan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Phillip J. Eby wrote: I suggest changing this to something like this: class tag(object): def __init__(self,name): self.name = name def __enter__(self): print %s % name

Re: [Python-Dev] checklist for filing a bug

2005-07-08 Thread Terry Reedy
Raymond Hettinger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In order to lower the barrier for reporting bugs, writing patches, and handling CVS commits, I am writing up checklists for each and I will put them up on python.org. -0 on the checklists. I am more enthusiastic

Re: [Python-Dev] Triple-quoted strings and indentation

2005-07-10 Thread Terry Reedy
Andrew Durdin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Very likely. But given the number of times that similar proposals have been put forth in the past, it is reasonable to expect that they will be brought up again in the future by others, if this is rejected--and in that

Re: [Python-Dev] Possible context managers in stdlib

2005-07-12 Thread Terry Reedy
Nick Coghlan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The main outcome of the PEP 343 terminology discussion was some proposed documentation I put on the Sourceforge patch tracker ([1]). Is this a proposal for the Language Reference manual? [1]

Re: [Python-Dev] read only files

2005-07-19 Thread Terry Reedy
Pranav Bagora [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am getting a permission denied error... Please help, The Python-dev mailing list (or gmane.comp.python.devel newsgroup) is for development of future Python releases. Please direct help questions to comp.lang.python

Re: [Python-Dev] __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-08-02 Thread Terry Reedy
falcon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello python-list, As I Understood, semantic may be next: [snip] This was properly posted to the general Python discussion group/list. Reposted here, to the Python development list/group, it is offtopic. If you did not get a

Re: [Python-Dev] [ python-Patches-790710 ] breakpoint command lists inpdb

2005-08-05 Thread Terry Reedy
Grégoire Dooms [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This patch is about to celebrate its second birthday :-) What should I do to get it reviewed further ? The guaranteed-by-a-couple-of-developers way is to review 5 other patches, post a summary here, and name this as the

Re: [Python-Dev] PEP 8: exception style

2005-08-06 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 8/6/05, A.M. Kuchling [EMAIL PROTECTED] wrote: PEP 8 doesn't express any preference between the two forms of raise statements: raise ValueError, 'blah' raise ValueError(blah) I like the second form better,

Re: [Python-Dev] Generalised String Coercion

2005-08-06 Thread Terry Reedy
PEP: 349 Title: Generalised String Coercion ... Rationale Python has had a Unicode string type for some time now but use of it is not yet widespread. There is a large amount of Python code that assumes that string data is represented as str instances. The long term plan for

Re: [Python-Dev] Distributed RCS

2005-08-13 Thread Terry Reedy
Another fwd, describing how Steve Alexander's group user bazaar. I found this rather clear and easy to understand even without having directly used CVS (other than to browse). Some of the automation features seem useful but I don't know whether they are specific to bazaar. Anyway, my

Re: [Python-Dev] [Python-checkins] python/dist/src/Modules _hashopenssl.c, NONE, 2.1 sha256module.c, NONE, 2.1 sha512module.c, NONE, 2.1 md5module.c, 2.35, 2.36 shamodule.c, 2.22, 2.23

2005-08-23 Thread Terry Reedy
Raymond Hettinger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Except from PEP 7: Use ANSI/ISO standard C (the 1989 version of the standard). Just checked (PB, Standard C): only one L allowed, not two. But with C99 compilers becoming more common, accidental usages of C99-isms

[Python-Dev] Remove str.find in 3.0?

2005-08-26 Thread Terry Reedy
Can str.find be listed in PEP 3000 (under builtins) for removal? Would anyone really object? Reasons: 1. Str.find is essentially redundant with str.index. The only difference is that str.index Pythonically indicates 'not found' by raising an exception while str.find does the same by

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-26 Thread Terry Reedy
Raymond Hettinger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Can str.find be listed in PEP 3000 (under builtins) for removal? FWIW, here is a sample code transformation (extracted from zipfile.py). Judge for yourself whether the index version is better: I am sure that we both

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-26 Thread Terry Reedy
Josiah Carlson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Terry Reedy [EMAIL PROTECTED] wrote: Can str.find be listed in PEP 3000 (under builtins) for removal? Guido has already approved, but I will try to explain my reasoning a bit better for you. There are basically two

Re: [Python-Dev] Any detail list of change between version2.1-2.2-2.3-2.4 of Python?

2005-08-27 Thread Terry Reedy
FAN [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You know Jython (Java version of Python) has only a stable version of 2.1, and two alpha version was release after 3 years. So if it wants to evolve to 2.2 , 2.3 or 2.4 as Python, some detail change list was need, and it's great

Re: [Python-Dev] empty string api for files

2005-08-28 Thread Terry Reedy
I'm not convinced. Where would you ever care about reading a file in N-bytes chucks? This was once a standard paradigm for IBM mainframe files. I vaguely remember having to specify the block/record size when opening such files. I have no idea of today's practice though. Terry J. Reedy

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-30 Thread Terry Reedy
Martin v. Löwis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Terry Reedy wrote: One (1a) is to give an inband signal that is like a normal response except that it is not (str.find returing -1). Python as distributed usually chooses 1b or 2. I believe str.find and .rfind

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-30 Thread Terry Reedy
Delaney, Timothy (Tim) [EMAIL PROTECTED] wrote in message before, sep, after = s.partition('?') ('http://www.python.org', '', '') before, sep, after = s.rpartition('?') ('', '', 'http://www.python.org') I can also see this as left, sep, right, with the sep not found case putting all in

Re: [Python-Dev] Revising RE docs (was: partition() (was: Removestr.find in 3.0?))

2005-08-30 Thread Terry Reedy
Fred L. Drake, Jr. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'd rather see it reversed from what it is as well. While I don't have the time myself (and don't consider it a critical issue), I certainly won't revert a patch to make the change without good reason. :-) Do

Re: [Python-Dev] Proof of the pudding: str.partition()

2005-08-30 Thread Terry Reedy
Shane Hathaway [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You can do both: make partition() return a sequence with attributes, similar to os.stat(). However, I would call the attributes before, sep, and after. One could see that as a special-case back-compatibility kludge

Re: [Python-Dev] Proof of the pudding: str.partition()

2005-08-31 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You can do both: make partition() return a sequence with attributes, similar to os.stat(). However, I would call the attributes before, sep, and after. Terry One could see that as a special-case

Re: [Python-Dev] Design Principles

2005-08-31 Thread Terry Reedy
Raymond Hettinger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] FWIW, after this is over, I'll put together a draft list of these principles. The one listed above has served us well. An early draft of itertools.ifilter() had an invert flag. The toolset improved when that was

Re: [Python-Dev] Proof of the pudding: str.partition()

2005-08-31 Thread Terry Reedy
for some use cases, a naive partition-based solution is going to be a lot slower than the old find+slice approach, no matter how you slice, index, or unpack the return value. The index+slice approach will still be available for such cases. I am sure we will see relative speed versus

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-02 Thread Terry Reedy
Paul F. Dubois [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Remove the print statementI laughed until my sides hurt. Hello? Try dating girls and talking to normal people, geek boys. We scientists still use these for debugging. We never 'move on' very far from the tutorial.

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-02 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] With so many people expressing a gut response and not saying what in the proposal they don't like, it's hard to even start a response. Is it... For me a bit of several things though with quite variable intensity.

Re: [Python-Dev] New Wiki page - PrintAsFunction

2005-09-03 Thread Terry Reedy
Ron Adam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] # standard printing write.ln(1, 2, 3) # print without trailing newline write(1, 2, 3) This violates this design principle: When there are two options and one is overwhelmingly more common in use (in this case, with newline

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-03 Thread Terry Reedy
Gustavo J. A. M. Carneiro [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I take this chance to state my humble opinion. Please keep the print function print(), not writeln()! printing stuff is everyone's favorite anachronistic expression, even though the output doesn't go to a

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-04 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Summarizing, my main problems with print as a statement are the transformations -- when print doesn't cut it, you have to switch to something entirely different. If it were a function the switch would feel much

Re: [Python-Dev] removing nested tuple function parameters

2005-09-19 Thread Terry Reedy
I consider the current situation to be a consistency feature. To a first approximation, Python function calls 'pass' objects by name-binding: param_name_list = arg_object_list Disabling structure unpacking in this assignment would make the language slightly more complex. Someone else posted

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-20 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In fact, I think Raymond's example is more properly considered an argument for adding a conditional expression than for removing the current behavior of the and/or shortcut operators; had we had a conditional

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-20 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 9/20/05, Terry Reedy [EMAIL PROTECTED] wrote: Given the later addition of generator expressions with mandatory parentheses , the mandatory-parentheses version of a conditional expression looks less strange to me

Re: [Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-20 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I just finished debugging some code that broke after upgrading to Python 2.4 (from 2.3). Turns out the code was testing list iterators for their boolean value (to distinguish them from None). This seem unnecessarily

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-20 Thread Terry Reedy
John J Lee [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The stricter form where you don't allow 'elif' will get used in more restricted circumstances, so gives less encouragement for widespread abuse of conditional expressions by people who don't like whitespace-based syntax.

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-21 Thread Terry Reedy
Guido: When you invited resumed discussion, did you intend to proceed from where the revised PEP left off (with a few variations on the table), or to start over from point zero (with potentially anything and everything on the table). In particular, do we need to rehash the reasons for

Re: [Python-Dev] Alternative name for str.partition()

2005-09-21 Thread Terry Reedy
Christian Stork [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, Aug 30, 2005 at 12:49:26PM +1200, Greg Ewing wrote: A more descriptive name than 'partition' would be 'split_at'. 'split_at' is really what's happening. (I came up with it independently of Greg, if that is

Re: [Python-Dev] Visibility scope for for/while/if statements

2005-09-22 Thread Terry Reedy
Alexander Myodov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Why the variables defined inside for/while/if statements (including loop variables for for) are visible outside this scope? Questions about why Python is the way it is belong on comp.lang.python, the general Python

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Terry Reedy
Bill Janssen [EMAIL PROTECTED] wrote in message news:05Sep22.141518pdt.58617@synergy1.parc.xerox.com... Sokolov Jura writes: It is so simple to write application server in Python. It is so difficult to make it scallable in CPython. CPython will not be wide popular without real

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-23 Thread Terry Reedy
Need I continue? Or is the dead still dead? Since 'a if b else c' is not obviously dead, I will summarize my argument against it thusly: It is ambiguous to people because it is can be parsed (by people, who are not automatons) as either '(a if) b (else c)' or 'a (if b) (else c)'. The first

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-23 Thread Terry Reedy
Jim Jewett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] A nice summary, to which I will add just a little. For a conditional expression, I think the choices are really down to the following, which was already way too much freedom last (http://www.python.org/peps/pep-0308.html)

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-23 Thread Terry Reedy
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Terry Reedy wrote: Many people, perhaps most, including me, read exp1 if exp2 else exp3 # as cond if etrue else efalse # in direct analogy with cond ? etrue : efalse # from C I'd have thought only Forth

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-23 Thread Terry Reedy
Nick Coghlan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip discussion indicating that our brains work different on this issue I am reminded of how some people seem to react to fingernails on a blackboard, while the screech is just another noise to me, except that I am in the

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] After all there's nothing wrong with and/or. This is one reason 'no addition' got a relatively high rank in the vote. Examples... telnet~1.py:'DO' if cmd == DO else 'DONT', versuscmd == DO

Re: [Python-Dev] New Pythondoc by effbot

2006-01-21 Thread Terry Reedy
http://effbot.org/lib/os.path.join On this page, 8 of 30 entries have a 'new in' comment. For anyone with no interest in the past, these constitute noise. I wonder if for 3.0, the timer can be reset and the docs start clean again. To keep them backwards compatible, they would also have to

Re: [Python-Dev] (libffi) Re: Copyright issue

2006-01-29 Thread Terry Reedy
Martin v. Löwis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Michael Hudson wrote: I think 2.58 actually had a brown-paper-bag release style bug, but 2.59 has been out for ages now. If we were prepared to AC_PREREQ(2.59), I think this whole issue could go away. It seems you

Re: [Python-Dev] any support for a methodcaller HOF?

2006-02-04 Thread Terry Reedy
Nick Coghlan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hell no. If I want to write a real function, I already have perfectly good syntax for that in the form of a def statement. I want to *increase* the conceptual (and pedagogical) difference between deferred expressions and

Re: [Python-Dev] any support for a methodcaller HOF?

2006-02-05 Thread Terry Reedy
Nick Coghlan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I guess I misstated myself slightly - I've previously advocated re-using the 'def' keyword, so there are obviously parallels I want to emphasize. If 3.0 comes with a conversion program, then I would like to see 'lambda'

Re: [Python-Dev] Let's just *keep* lambda

2006-02-05 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] After so many attempts to come up with an alternative for lambda, perhaps we should admit defeat. I've not had the time to follow the most recent rounds, but I propose that we keep lambda, so as to stop wasting

Re: [Python-Dev] _length_cue()

2006-02-09 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Might I suggest that at least you consider using hint instead of cue? ... Greg I agree that hint is a more precise name. Ditto. In addition, we already have queues. Do we really need to use a homonym that means

Re: [Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation

2006-02-09 Thread Terry Reedy
Add a nb_index slot to PyNumberMethods, and a corresponding __index__ special method. Objects could define a function to place in the sq_index slot that returns an appropriate I presume 'sq_index' should also be 'nb_index' ___ Python-Dev

Re: [Python-Dev] nice()

2006-02-14 Thread Terry Reedy
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I don't think you're doing anyone any favours by trying to protect them from having to know about these things, because they *need* to know about them if they're not to write algorithms that seem to work fine on tests but

Re: [Python-Dev] Proposal: defaultdict

2006-02-17 Thread Terry Reedy
Fredrik Lundh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Raymond Hettinger wrote: I would like to add something like this to the collections module, but a PEP is probably needed to deal with issues like: frankly, now that Guido is working 50% on Python, do we really have

Re: [Python-Dev] bytes.from_hex()

2006-02-18 Thread Terry Reedy
Josiah Carlson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Again, the problem is ambiguity; what does bytes.recode(something) mean? Are we encoding _to_ something, or are we decoding _from_ something? Are we going to need to embed the direction in the encoding/decoding name

Re: [Python-Dev] Proposal: defaultdict

2006-02-18 Thread Terry Reedy
Quoting [EMAIL PROTECTED]: The only question in my mind is whether or not getting a non-existent value under the influence of a given default value should stick that value in the dictionary or not. It seems to me that there are at least two types of default dicts, which have opposite

Re: [Python-Dev] Proposal: defaultdict

2006-02-19 Thread Terry Reedy
Raymond Hettinger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [Terry Reedy] One is a 'universal dict' that maps every key to something -- the default if nothing else. That should not have the default ever explicitly entered. Udict.keys() should only give the keys

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Terry Reedy
I know it is tempting and perhaps ok in your own privatecode, but casually masking builtins like 'str' in public library code sets a bad example ;-). tjr ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] buildbot is all green

2006-02-19 Thread Terry Reedy
is always necessary with Windows). With a couple of more machines added, should there be two separate pages for trunk and 2.4 builds? Or do most checkins affect both? ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] buildbot is all green

2006-02-20 Thread Terry Reedy
Martin v. Löwis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Terry Reedy wrote: With a couple of more machines added, should there be two separate pages for trunk and 2.4 builds? Or do most checkins affect both? I'd like to avoid this, assuming that people only look

Re: [Python-Dev] buildbot vs. Windows

2006-02-21 Thread Terry Reedy
Neal Norwitz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There's nothing to prevent buildbot from making debug builds, though that is not currently done. Now that there are separate report pages for 2.4 and 2.5, you could add pages for debug builds, perhaps with a lower

Re: [Python-Dev] PEP for Better Control of Nested Lexical Scopes

2006-02-21 Thread Terry Reedy
Jeremy Hylton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I recall the discussion correctly, Guido said he was open to a version of nested scopes that allowed rebinding. Yes. Among other places, he said in

Re: [Python-Dev] PEP for Better Control of Nested Lexical Scopes

2006-02-22 Thread Terry Reedy
Almann T. Goo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] IMO, Having properly nested scopes in Python in a sense made having closures a natural idiom to the language and part of its user interface. By not allowing the name re-binding it almost seems like that user interface

Re: [Python-Dev] bytes.from_hex()

2006-02-22 Thread Terry Reedy
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Efficiency is an implementation concern. It is also a user concern, especially if inefficiency overruns memory limits. In Py3k, strings which contain only ascii or latin-1 might be stored as 1 byte per character, in

Re: [Python-Dev] PEP 328

2006-02-25 Thread Terry Reedy
Thomas Wouters [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The one open point that Aahz forwarded me, and is expressed somewhat in http://mail.python.org/pipermail/python-dev/2004-September/048695.html , is the case where you have a package that you want to transparently

Re: [Python-Dev] defaultdict and on_missing()

2006-02-28 Thread Terry Reedy
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] And you don't think there are many different types of iterables? You might as well argue that we don't need len() because it only applies to sequences. Since you mention it..., many people *have* asked on c.l.p why len()

Re: [Python-Dev] Webstats for www.python.org et al.

2006-02-28 Thread Terry Reedy
Thomas Wouters [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I added webstats for all subsites of python.org: http://www.python.org/webstats/ http://beta.python.org/webstats/ http://bugs.python.org/webstats/ http://planet.python.org/webstats/ http://docs.python.org/webstats/

Re: [Python-Dev] Slightly OT: Replying to posts

2006-03-01 Thread Terry Reedy
Talin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Just a quick question about the mechanics of replying to this list. I am a subscriber to the list, however I much prefer readiing the list archives on the web instead of having the postings delivered to my email account. Because

Re: [Python-Dev] iterator API in Py3.0

2006-03-06 Thread Terry Reedy
Michael Hoffman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Another nice thing about having a next() built-in is that it makes getting the first item of a generator expression a lot more elegant, I think this: next(item for item in items if item 3) is a lot clearer than this:

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Terry Reedy
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Baptiste Carvello wrote: what about except type with value: a program dies with an error message, not as an error message. No. The exception object you're catching *is* the value, not something which *has* a

Re: [Python-Dev] Bug 1184112 still valid

2006-03-17 Thread Terry Reedy
Fredrik Lundh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] http://sourceforge.net/tracker/index.php?func=detailaid=1184112group_id=5470atid=105470 When compiling multi-line statements, two caveats apply: line endings must be represented by a single newline character ('\n'),

Re: [Python-Dev] GeneratorExit inheriting from Exception

2006-03-18 Thread Terry Reedy
Exception +- KeyboardInterrupt +- GeneratorExit +- SystemExit +- StopIteration This would look even better to me and be easier to learn and remember if the above specifics were gathered under one general category parallel to Error and Warning. Not sure what. Not NonErrorNonWarning though.

Re: [Python-Dev] Documenting the ssize_t Python C API changes

2006-03-21 Thread Terry Reedy
M.-A. Lemburg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Perhaps we should have three lists: 1. Py_ssize_t output parameters (these need changes) 2. Py_ssize_t return values (these need overflow checks) 3. Py_ssize_t input parameters (these can be used to enhance the

Re: [Python-Dev] PySet API

2006-03-28 Thread Terry Reedy
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gareth McCaughan wrote: For what it's worth[1], I think Raymond is absolutely on crack here. +1 on a good concrete set API from me, too. For what it's worth, I think Gareth's crack at Raymond is childish and out of place

  1   2   3   4   5   6   7   8   9   10   >