[Python-Dev] TAR problems under Solaris

2006-01-04 Thread Reinhold Birkenfeld
Recently, someone on dclpy posted about an error he got when he tried to unpack the Python distribution tarball with Sparc Solaris 9's tar: tar: directory checksum error With GNU tar, it worked correctly. Is this a known issue, or is it irrelevant? Reinhold -- Mail address is perfectly

Re: [Python-Dev] TAR problems under Solaris

2006-01-04 Thread Reinhold Birkenfeld
Tim Peters wrote: [Reinhold Birkenfeld] Recently, someone on dclpy posted about an error he got when he tried to unpack the Python distribution tarball with Sparc Solaris 9's tar: tar: directory checksum error With GNU tar, it worked correctly. Is this a known issue, or is it irrelevant

Re: [Python-Dev] Naming conventions in Py3K

2005-12-30 Thread Reinhold Birkenfeld
Ka-Ping Yee wrote: In a fair number of cases, Python doesn't follow its own recommended naming conventions. Changing these things would break backward compatibility, so they are out of the question for Python 2.*, but it would be nice to keep these in mind for Python 3K. Constants in

Re: [Python-Dev] a quit that actually quits

2005-12-28 Thread Reinhold Birkenfeld
[EMAIL PROTECTED] wrote: Fredrik a quit/exit command that actually quits, instead of printing a Fredrik you didn't say please! message. I like Fredrik's idea more and more. Without my Unix bifocals it wouldn't occur to me that Ctrl-D is the way to exit. Knowing Ctrl-Z is EOF on

Re: [Python-Dev] a quit that actually quits

2005-12-28 Thread Reinhold Birkenfeld
Fredrik Lundh wrote: Walter Dörwald wrote: We have sys.displayhook and sys.excepthook. Why not add a sys.inputhook? sys.inputhook gets passed each line entered and may return True if it has processed the line inself and False if normal handling of the input should be done. This allows

Re: [Python-Dev] a quit that actually quits

2005-12-27 Thread Reinhold Birkenfeld
Fredrik Lundh wrote: sourceforge just went off the air, so I'm posting this patch here, in order to distract you all from Christian's deque thread. this silly little patch changes the behaviour of the interpreter so that quit and exit actually exits the interpreter. it does this by

Re: [Python-Dev] a quit that actually quits

2005-12-27 Thread Reinhold Birkenfeld
Fredrik Lundh wrote: Reinhold Birkenfeld wrote: What is wrong with something like this: class Quitter: ... def __repr__(self): raise SystemExit ... exit = quit = Quitter() vars() # oops! You're right. class Quitter: ... def __repr__(self): ... n = sys._getframe(1

Re: [Python-Dev] NotImplemented reaching top-level

2005-12-25 Thread Reinhold Birkenfeld
Armin Rigo wrote: Hi Facundo, On Sat, Dec 24, 2005 at 02:31:19PM -0300, Facundo Batista wrote: d += 1.2 d NotImplemented The situation appears to be a mess. Some combinations of specific operators fail to convert NotImplemented to a TypeError, depending on old- or

Re: [Python-Dev] status of development documentation

2005-12-23 Thread Reinhold Birkenfeld
Robey Pointer wrote: On 22 Dec 2005, at 3:51, Michael Hudson wrote: Fredrik Lundh [EMAIL PROTECTED] writes: Checked the python-list archives lately? If you google c.l.python for the word documentation, you'll find recent megathreads with subjects like bitching about the

Re: [Python-Dev] Expose Subversion revision number to Python

2005-12-18 Thread Reinhold Birkenfeld
Martin v. Löwis wrote: Propose first. I have the feeling that the feature will change forth and back if everybody gets to say something. I would call it sys.svnversion (because that's what it is). Perhaps it could make sense for sys.svnversion to exist only in a debug build. This way people

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-15 Thread Reinhold Birkenfeld
Ian Bicking wrote: Guido van Rossum wrote: On 12/14/05, Barry Warsaw [EMAIL PROTECTED] wrote: On Thu, 2005-12-15 at 11:13 +1100, Dave Cole wrote: The only thing I strongly disagree with is the promotion of javaNaming to equal footing with python_naming. Actually, they're not on equal

[Python-Dev] Python 3

2005-11-26 Thread Reinhold Birkenfeld
Hi, don't know if this is known here, but it seems we have quite a long way to go: http://kuerzer.de/python3 Reinhold wink ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] a different kind of reduce...

2005-11-01 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: [Martin Blais] I'm always--literally every time-- looking for a more functional form, something that would be like this: # apply dirname() 3 times on its results, initializing with p ... = repapply(dirname, 3, p) [Greg Ewing] Maybe ** should be

Re: [Python-Dev] Definining properties - a use case for class decorators?

2005-10-22 Thread Reinhold Birkenfeld
Michele Simionato wrote: As other explained, the syntax would not work for functions (and it is not intended to). A possible use case I had in mind is to define inlined modules to be used as bunches of attributes. For instance, I could define a module as module m(): a = 1 b = 2

Re: [Python-Dev] Divorcing str and unicode (no more implicit conversions).

2005-10-15 Thread Reinhold Birkenfeld
Martin Blais wrote: On 10/3/05, Michael Hudson [EMAIL PROTECTED] wrote: Martin Blais [EMAIL PROTECTED] writes: How hard would that be to implement? import sys reload(sys) sys.setdefaultencoding('undefined') Hmmm any particular reason for the call to reload() here? Yes.

Re: [Python-Dev] Autoloading? (Making Queue.Queue easier to use)

2005-10-14 Thread Reinhold Birkenfeld
Sokolov Yura wrote: May be allow modules to define __getattr__ ? def __getattr__(thing): try: return __some_standart_way__(thing) except AttributeError: if thing==Queue: import sys from Queue import Queue

Re: [Python-Dev] Extending tuple unpacking

2005-10-11 Thread Reinhold Birkenfeld
Greg Ewing wrote: Guido van Rossum wrote: BTW, what should [a, b, *rest] = (1, 2, 3, 4, 5) do? Should it set rest to (3, 4, 5) or to [3, 4, 5]? Whatever type is chosen, it should be the same type, always. The rhs could be any iterable, not just a tuple or a list. Making a

Re: [Python-Dev] Tests and unicode

2005-10-03 Thread Reinhold Birkenfeld
Martin v. Löwis wrote: Reinhold Birkenfeld wrote: One problem is that no Unicode escapes can be used since compiling the file raises ValueErrors for them. Such strings would have to be produced using unichr(). You mean, in Unicode literals? There are various approaches, depending

[Python-Dev] Tests and unicode

2005-10-01 Thread Reinhold Birkenfeld
Hi, I looked whether I could make the test suite pass again when compiled with --disable-unicode. One problem is that no Unicode escapes can be used since compiling the file raises ValueErrors for them. Such strings would have to be produced using unichr(). Is this the right way? Or is

[Python-Dev] inplace operators and __setitem__

2005-09-28 Thread Reinhold Birkenfeld
Hi, a general question. Consider: class A(list): def __setitem__(self, index, item): # do something with index and item return list.__setitem__(self, index, item) lst = A([1,set()]) lst[0] |= 1 lst[1] |= set([1]) Do we want lst.__setitem__ to be called in the second

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

2005-09-25 Thread Reinhold Birkenfeld
Sokolov Yura wrote: Sorry for looking in every hole. Just a suggestion. A= condition and first or second problem is in case when first in (None,0,[],). May be invent new operator 'take'. take - returns right operator when left evals to True and stops computing condidtional expression.

Re: [Python-Dev] IMPORTANT: release24-maint branch is FROZEN from 2005-09-21 00:00 UTC for 2.4.2

2005-09-22 Thread Reinhold Birkenfeld
Anthony Baxter wrote: Starting in about 11 hours time, the release24-maint branch is FROZEN for the 2.4.2c1 release. The freeze will last for around a day, and then we're in a state of mostly-frozen for another week, until 2.4.2 (final). During that week, please don't check things into the

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

2005-09-21 Thread Reinhold Birkenfeld
Jason Orendorff wrote: Honestly, I think I would prefer this syntax. Examples from real code, before and after: lines = [line for line in pr.block.body if line.logical_line.strip() != ''] lines = [for line in pr.block.body: if

Re: [Python-Dev] and and or operators in Py3.0

2005-09-20 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: I propose that in Py3.0, the and and or operators be simplified to always return a Boolean value instead of returning the last evaluated argument. No, please not. It's useful sometimes and doesn't hurt most times. 1) The construct can be error-prone. When an error

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

2005-09-20 Thread Reinhold Birkenfeld
Guido van Rossum wrote: Given this realization, I'm now -1 on Raymond's idea, and +1 on adding a conditional expression. I believe (y if x else z) was my favorite last time, wasn't it? I've changed the subject accordingly. As the PEP states, I'm not sure if changing the customary order of

Re: [Python-Dev] possible memory leak on windows (valgrind report)

2005-09-19 Thread Reinhold Birkenfeld
Neal Norwitz wrote: I ran 2.4.x through valgrind and found two small problems on Linux that have been fixed. There may be some other issues which could benefit from more eyes (small, probably one time memory leaks). The entire run is here: http://python.org/valgrind-2.4.2.out (I need

Re: [Python-Dev] python/dist/src/Lib urllib.py, 1.165.2.1, 1.165.2.2

2005-09-15 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: [Reinhold Birkenfeld] This last patch includes a new exception, are you sure that this can be safely backported? Not too worried about it. Better to have the exception reported than the silent failure that confused the heck out of everyone who tried to figure-out

Re: [Python-Dev] speeding up list append calls

2005-09-14 Thread Reinhold Birkenfeld
Martin v. Löwis wrote: Neal Norwitz wrote: This code doesn't really work in general. It assumes that any append function call is a list method, which is obviously invalid. But if a variable is known to be a list (ie, local and assigned as list (BUILD_LIST) or a list comprehension), could we

[Python-Dev] Term unification

2005-09-14 Thread Reinhold Birkenfeld
Hi, looking at bug #1283289, I saw that the term keyword parameter is used in Python/getargs.c, mixed with keyword argument. Grepping through the source, keyword parameter had 43 matches, while keyword argument had 430. Should the parameter form be extinguished? Reinhold (And BTW, should bug

Re: [Python-Dev] Term unification

2005-09-14 Thread Reinhold Birkenfeld
for the call site but parameter for the function/method definition. So you can't just count occurrences. On 9/14/05, Reinhold Birkenfeld [EMAIL PROTECTED] wrote: Hi, looking at bug #1283289, I saw that the term keyword parameter is used in Python/getargs.c, mixed with keyword argument

[Python-Dev] str.dedent

2005-09-14 Thread Reinhold Birkenfeld
Hi, some time ago, I proposed a string method dedent (which currently is in the textwrap module). The RFE is at http://python.org/sf/1237680. Any opinions? If I don't get positive comments, I'll reject it. Reinhold -- Mail address is perfectly valid!

Re: [Python-Dev] str.dedent

2005-09-14 Thread Reinhold Birkenfeld
a block that it's better to keep it as Python source code. On 9/14/05, Reinhold Birkenfeld [EMAIL PROTECTED] wrote: Hi, some time ago, I proposed a string method dedent (which currently is in the textwrap module). The RFE is at http://python.org/sf/1237680. Any opinions? If I don't get

Re: [Python-Dev] python/dist/src/Lib urllib.py, 1.165.2.1, 1.165.2.2

2005-09-14 Thread Reinhold Birkenfeld
[EMAIL PROTECTED] wrote: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31892 Modified Files: Tag: release24-maint urllib.py Log Message: Sync-up with patches to the head. Includes SF 1016880: urllib.urlretrieve silently

Re: [Python-Dev] Tools directory (Was RE: Replacement for print in Python 3.0)

2005-09-12 Thread Reinhold Birkenfeld
Brett Cannon wrote: On 9/8/05, Tony Meyer [EMAIL PROTECTED] wrote: [finding Tools/i18n/pygettext.py] You're right, I think Tools is probably a bad place for anything. If it's not part of the stdlib, I'll likely never find it. Agreed. Maybe with the introduction of -m in Python 2.4,

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread Reinhold Birkenfeld
Greg Ewing wrote: Charles Cazabon wrote: Perhaps py3k could have a py2compat module. Importing it could have the effect of (for instance) putting compile, id, and intern into the global namespace, making print an alias for writeln, There's no way importing a module could add something

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

2005-09-01 Thread Reinhold Birkenfeld
add something that works like the old print statement, unless some serious magic is going on... [Reinhold Birkenfeld] You'd have to enclose print arguments in parentheses. Of course, the trailing comma form would be lost. And good riddance! The print statement harks back to ABC

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

2005-09-01 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: Do we really need writef()? It seems to be not much better than its %- formatting equivalent. Actually, formatting needs to become a function. The overloading of the arithmetic mod operator has proven to be unfortunate (if only because of precedence issues).

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

2005-08-31 Thread Reinhold Birkenfeld
Bill Janssen wrote: (*) Regular Expressions This can be orthogonally added to the 're' module, and definitely should not be part of the string method. Sounds right to me, and it *should* be orthogonally added to the 're' module coincidentally simultaneously with the change to the

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

2005-08-27 Thread Reinhold Birkenfeld
Bill Janssen wrote: There are basically two ways for a system, such as a Python function, to indicate 'I cannot give a normal response. One (1a) is to give an inband signal that is like a normal response except that it is not (str.find returing -1). A variation (1b) is to give an inband

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

2005-08-27 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: [Martin] For another example, file.read() returns an empty string at EOF. When my turn comes for making 3.0 proposals, I'm going to recommend nixing the empty string at EOF API. That is a carry-over from C that made some sense before there were iterators. Now, we

Re: [Python-Dev] test_bz2 on Python 2.4.1

2005-08-27 Thread Reinhold Birkenfeld
A.B., Khalid wrote: #--- Python 2.4.1 from CVS -# [test_bz2] RuntimeError: wrong sequence of bz2 library commands used I don't understand this. The sources for the bz2 modules are exactly equal in both branches. I know. Even the tests are equal. I

Re: [Python-Dev] operator.c for release24-maint and test_bz2 on Python 2.4.1

2005-08-26 Thread Reinhold Birkenfeld
A.B., Khalid wrote: Hello there, The release24-maint check-ins for today contained this typo: === RCS file: /cvsroot/python/python/dist/src/Modules/operator.c,v retrieving revision 2.29 retrieving revision 2.29.4.1 diff

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-25 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: Deprecation means your code will still work I hope every book that documents except: also adds but don't use this except under very special circumstances. I think you're overreacting (again), Raymond. 3.0 will be much more successful if we can introduce many of its

[Python-Dev] Docs/Pointer to Tools/scripts?

2005-08-24 Thread Reinhold Birkenfeld
Hi, after adding Oleg Broytmann's findnocoding.py to Tools/scripts, I wonder whether the Tools directory is documented at all. There are many useful scripts there which many people will not find if they are not listed anywhere in the docs. Just a thought. Reinhold -- Mail address is perfectly

Re: [Python-Dev] python/dist/src/Doc/tut tut.tex,1.276,1.277

2005-08-23 Thread Reinhold Birkenfeld
[EMAIL PROTECTED] wrote: I'm not a native speaker, but... @@ -114,7 +114,7 @@ programs, or to test functions during bottom-up program development. It is also a handy desk calculator. -Python allows writing very compact and readable programs. Programs +Python enables programs to written

Re: [Python-Dev] Generalised String Coercion

2005-08-07 Thread Reinhold Birkenfeld
Guido van Rossum wrote: The main problem for a smooth Unicode transition remains I/O, in my opinion; I'd like to see a PEP describing a way to attach an encoding to text files, and a way to decide on a default encoding for stdin, stdout, stderr. FWIW, I've already drafted a patch for the

Re: [Python-Dev] PEP 348: Exception Reorganization for Python 3.0

2005-08-05 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: 2. There is a lesson to be taken from a story in the ACM risks forum where a massive phone outage was traced to a single line of C code that ran a break to get out of a nested if-statement. The interesting part is that this was known to be mission critical code yet

Re: [Python-Dev] builtin filter function

2005-07-19 Thread Reinhold Birkenfeld
Ruslan Spivak wrote: Hello. I was reading source code for bltinmodule.c and found probably erroneus stuff in filter function. I'm newbie to python inners and don't know if attached code is worth for a patch submission. I would appreciate if someone could take a look at it and if it's ok

Re: [Python-Dev] python/dist/src/Doc/lib emailutil.tex,1.11,1.12

2005-07-17 Thread Reinhold Birkenfeld
[EMAIL PROTECTED] wrote: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20654 Modified Files: emailutil.tex Log Message: Note that usegmt is new in 2.4. Closes #1239681. Index: emailutil.tex

Re: [Python-Dev] Some RFE for review

2005-07-16 Thread Reinhold Birkenfeld
Reinhold Birkenfeld wrote: Hi, while bugs and patches are sometimes tricky to close, RFE can be very easy to decide whether to implement in the first place. So what about working a bit on this front? Here are several RFE reviewed, perhaps some can be closed (should is always from

[Python-Dev] SF patch #1214889 - file.encoding support

2005-07-14 Thread Reinhold Birkenfeld
Hi, would anyone care to comment about this patch of mine -- https://sourceforge.net/tracker/?func=detailatid=305470aid=1214889group_id=5470 It makes file.encoding read-write and lets the write() and writelines() methods obey it. Reinhold -- Mail address is perfectly valid!

Re: [Python-Dev] SF patch #1214889 - file.encoding support

2005-07-14 Thread Reinhold Birkenfeld
M.-A. Lemburg wrote: Reinhold Birkenfeld wrote: Hi, would anyone care to comment about this patch of mine -- https://sourceforge.net/tracker/?func=detailatid=305470aid=1214889group_id=5470 It makes file.encoding read-write and lets the write() and writelines() methods obey it. Done

[Python-Dev] Python on PyPI

2005-07-14 Thread Reinhold Birkenfeld
Hi, to whom it may concern: the Python package on PyPI is at version 2.3.2. Reinhold -- Mail address is perfectly valid! ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

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

2005-07-10 Thread Reinhold Birkenfeld
Guido van Rossum wrote: On 7/5/05, Andrew Durdin [EMAIL PROTECTED] wrote: I have written a patch that changes the way triple-quoted strings are scanned so that leading whitespace is ignored in much the same way that pep 257 handles it for docstrings. Largely this was for a learning experience

[Python-Dev] Possible context managers in stdlib

2005-07-08 Thread Reinhold Birkenfeld
Hi, I compiled a list of some possible new context managers that could be added to the stdlib. Introducing a new feature should IMO also show usage of it in the distribution itself. That wasn't done with decorators (a decorators module is compiled at the moment, if I'm right), but with context

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

2005-07-08 Thread Reinhold Birkenfeld
Phillip J. Eby wrote: At 10:24 PM 7/8/2005 +0200, Reinhold Birkenfeld wrote: with sys.trace Note that it's currently not possible to inspect the trace/profile hooks from Python code, only from C, so that might be, um, interesting to implement. That was beyond my short view

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

2005-07-08 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: I compiled a list of some possible new context managers that could be added to the stdlib. Introducing a new feature should IMO also show usage of it in the distribution itself. That wasn't done with decorators (a decorators module is compiled at the moment, if

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

2005-07-06 Thread Reinhold Birkenfeld
Paul Moore wrote: On 7/6/05, Michael Chermside [EMAIL PROTECTED] wrote: Paul Moore writes: I also like the fact that it offers a neat 1-word name for the generator decorator, @context. Well, ok... does anyone *else* agree? I too saw this and thought neat! a simple one-word name!. But

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

2005-07-02 Thread Reinhold Birkenfeld
Nick Coghlan wrote: [...] If the right hand side of 'as' permitted the same forms as are going to be permitted for the 'as' clause in 'with' statements, then Ralf's situation could be handled via: def __init__(self as s, x as s.x, y as s.y, z as s.z): pass Essentially, it

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFEforreview)

2005-06-29 Thread Reinhold Birkenfeld
Michael Hoffman wrote: On Wed, 29 Jun 2005, Tony Meyer wrote: Maybe this has already been answered somewhere (although I don't recall seeing it, and it's not in the sourceforge tracker) but has anyone asked Jason Orendorff what his opinion about this (including the module in the stdlib) is?

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)

2005-06-27 Thread Reinhold Birkenfeld
Michael Hoffman wrote: On Sun, 26 Jun 2005, Phillip J. Eby wrote: At 08:19 PM 6/26/2005 +0100, Michael Hoffman wrote: On Sun, 26 Jun 2005, Phillip J. Eby wrote: * drop getcwd(); it makes no sense on a path instance Personally I use path.getcwd() as a class method all the time. It makes

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)

2005-06-27 Thread Reinhold Birkenfeld
Phillip J. Eby wrote: At 08:20 AM 6/27/2005 +0100, Michael Hoffman wrote: os.getcwd() returns a string, but path.getcwd() returns a new path object. In that case, I'd expect it to be 'path.fromcwd()' or 'path.cwd()'; i.e. a constructor classmethod by analogy with 'dict.fromkeys()' or

[Python-Dev] Some RFE for review

2005-06-26 Thread Reinhold Birkenfeld
Hi, while bugs and patches are sometimes tricky to close, RFE can be very easy to decide whether to implement in the first place. So what about working a bit on this front? Here are several RFE reviewed, perhaps some can be closed (should is always from submitter's point of view): 1193128:

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)

2005-06-26 Thread Reinhold Birkenfeld
Phillip J. Eby wrote: At 06:57 PM 6/26/2005 +0200, Reinhold Birkenfeld wrote: 1226256: The path module by Jason Orendorff should be in the standard library. http://www.jorendorff.com/articles/python/path/ Review: the module is great and seems to have a large user base. On c.l.py

Re: [Python-Dev] [Python-checkins] python/dist/src/Lib Cookie.py, 1.17, 1.18

2005-06-26 Thread Reinhold Birkenfeld
Tim Peters wrote: [EMAIL PROTECTED] Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4891/Lib Modified Files: Cookie.py Log Message: bug [ 1108948 ] Cookie.py produces invalid code [...] I assume this accounts for the current

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-19 Thread Reinhold Birkenfeld
Kay Schluehr wrote: Reduction provides often the advantage to make expressions/statements scriptable what they are not in Python. Python is strong in scripting classes/objects ( a big plus of the language ) but you can't simply use the language to prove that lambda x,y:

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-19 Thread Reinhold Birkenfeld
Kay Schluehr wrote: Reinhold Birkenfeld wrote: lambda x,y: x+y*y lambda x,y: y**2+x are essentialy the same functions with different implementations [1]. Except that they are not. Think of __pow__, think of __add__ and __radd__. You know the difference

Re: [Python-Dev] Thoughts on stdlib evolvement

2005-06-07 Thread Reinhold Birkenfeld
Skip Montanaro wrote: Tim On 6/6/05, Reinhold Birkenfeld [EMAIL PROTECTED] wrote: - Flat namespace: Should we tend to a more hierarchic library (e.g. inet.url, inet.http, inet.nntp)? This would increase clarity when searching for a module. Tim -1. I feel

[Python-Dev] Thoughts on stdlib evolvement

2005-06-06 Thread Reinhold Birkenfeld
Hello, I am currently having some thoughts about the standard library, with regard to Python 2.5 and 3.0. Since I don't want to withhold them from you, here are they ;) - Flat namespace: Should we tend to a more hierarchic library (e.g. inet.url, inet.http, inet.nntp)? This would increase

Re: [Python-Dev] Closing old bugs

2005-06-02 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: I've seen some systems that solve this problem by allowing users to vote for favorite bugs... then you can tell the important bugs because they are more likely to have lots of votes. As I see it, Facundo is using a variant of that system. He is asking whether there

[Python-Dev] sys.path in interactive session

2005-06-02 Thread Reinhold Birkenfeld
While looking at bug #779191, I saw that sys.path's first element is '' in interactive sessions, but the current dir otherwise. Is this intentional? Reinhold -- Mail address is perfectly valid! ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Request for dev permissions

2005-05-31 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: [Reinhold Birkenfeld] would anybody mind if I was given permissions on the tracker and CVS, for fixing small things like bug #1202475. I feel that I can help you others out a bit with this and I promise I won't change the interpreter to accept braces... Let's

[Python-Dev] Request for dev permissions

2005-05-17 Thread Reinhold Birkenfeld
Hello, would anybody mind if I was given permissions on the tracker and CVS, for fixing small things like bug #1202475. I feel that I can help you others out a bit with this and I promise I won't change the interpreter to accept braces... Reinhold -- Mail address is perfectly valid!

Re: [Python-Dev] Pre-PEP: Unifying try-except and try-finally

2005-05-06 Thread Reinhold Birkenfeld
Guido van Rossum wrote: [François Pinard] It happens once in a while that I want to comment out the except clauses of a try statement, when I want the traceback of the inner raising, for debugging purposes. Syntax forces me to also comment the `try:' line, and indent out the lines following

[Python-Dev] Pre-PEP: Unifying try-except and try-finally

2005-05-04 Thread Reinhold Birkenfeld
: $Revision: $ Last-Modified: $Date: $ Author: Reinhold Birkenfeld [EMAIL PROTECTED] Status: Draft Type: Standards Track Content-Type: text/plain Created: 04-May-2005 Post-History: Abstract This PEP proposes a change in the syntax and semantics of try statements to allow combined try-except

Re: [Python-Dev] PEP 340: Breaking out.

2005-05-04 Thread Reinhold Birkenfeld
Paul Moore wrote: On 5/4/05, Alex Martelli [EMAIL PROTECTED] wrote: On May 4, 2005, at 01:57, Paul Moore wrote: I can't think of a reasonable condition which wouldn't involve reading the file - which either involves an inner loop (and we already can't break out of two loops, so the

Re: [Python-Dev] begin as keyword for pep 340

2005-05-04 Thread Reinhold Birkenfeld
Adam Souzis wrote: I'm a bit surpised that no one has yet [1] suggested begin as a keyword instead block as it seems to express the intent of blocks and is concise and readable. For example, here are the examples in PEP 340 rewritten using begin: begin locking(): ... I don't know, but

Re: [Python-Dev] Pre-PEP: Unifying try-except and try-finally

2005-05-04 Thread Reinhold Birkenfeld
Tim Peters wrote: [Reinhold Birkenfeld] ... I think the behaviour of the else clause is much harder to guess, mainly when used with the looping constructs. No, that's obvious wink. OK, I'm persuaded. Well you wield the Force, master. What about `else` mixed with try/except/finally

[Python-Dev] Re: anonymous blocks

2005-04-26 Thread Reinhold Birkenfeld
Guido van Rossum wrote: [Greg Ewing] I like the general shape of this, but I have one or two reservations about the details. That summarizes the feedback so far pretty well. I think we're on to something. And I'm not too proud to say that Ruby has led the way here to some extent (even if

[Python-Dev] Re: anonymous blocks

2005-04-26 Thread Reinhold Birkenfeld
Nick Coghlan wrote: Guido van Rossum wrote: [snip] - I think there's a better word than Flow, but I'll keep using it until we find something better. How about simply reusing Iteration (ala StopIteration)? Pass in 'ContinueIteration' for 'continue' Pass in 'BreakIteration' for

[Python-Dev] Re: anonymous blocks

2005-04-23 Thread Reinhold Birkenfeld
Nick Coghlan wrote: Interestingly, with this approach, for dummy in my_resource() would still wrap the block of code in the entrance/exit code (because my_resource *is* a generator), but it wouldn't get the try/finally semantics. An alternative would be to replace the 'yield None' with

[Python-Dev] Re: anonymous blocks

2005-04-19 Thread Reinhold Birkenfeld
Guido van Rossum wrote: What was your opinion on where as a lambda replacement? i.e. foo = bar(callback1, callback2) where: def callback1(x): print hello, def callback2(x): print world! I don't recall seeing this proposed, but I might have -- I thought of

[Python-Dev] Re: Shorthand for lambda

2005-03-23 Thread Reinhold Birkenfeld
Ka-Ping Yee wrote: It dawned on me that you could use this idea to make the whole filter/lambda experience vastly more pleasant. I whipped up a quick implementation: from placeholder import _ numbers = [5, 9, 56, 34, 1, 24, 37, 89] filter(_ 30, numbers) [5, 9, 1, 24]

[Python-Dev] Re: Change 'env var BROWSER override' semantics in webbrowser.py

2005-03-18 Thread Reinhold Birkenfeld
Martin v. Löwis wrote: Rodrigo Dias Arruda Senra wrote: I propose a small change in webbrowse.py module. I think I'm generally in favour of such a change. However: - please don't post patches to python-dev, unless you *want* them to be ignored. Typically, nobody will pick up patches

[Python-Dev] Re: @deprecated (was: Useful thread project for 2.5?)

2005-03-11 Thread Reinhold Birkenfeld
Nick Coghlan wrote: Raymond Hettinger wrote: Decorators like this should preserve information about the underlying function: def deprecated(func): This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted

[Python-Dev] Legacy bugs on SF

2005-03-01 Thread Reinhold Birkenfeld
Hello, still in 2004, this comment was added to old bugs with groups Python2.*: Please, could you verify if this problem persists in Python 2.3.4 or 2.4? If yes, in which version? Can you provide a test case? If the problem is solved, from which version? Note that if you fail to answer in

[Python-Dev] What about CALL_ATTR?

2005-02-23 Thread Reinhold Birkenfeld
While rummaging in the old patches, I found this: The result of the PyCore sprint of me and Brett: the CALL_ATTR opcode (LOAD_ATTR and CALL_FUNCTION combined) that skips the PyMethod creation and destruction for classic classes (but not newstyle classes, yet.) The code is somewhat rough yet, it