[Python-Dev] Python long command line options

2006-05-04 Thread Heiko Wundram
Hi all! Martin von Löwis said that it'd be necessary to discuss a patch to Python's ability to parse command-line parameters to the interpreter here, and I thought I might start the ball rolling. The associated patch of mine is:

Re: [Python-Dev] lambda in Python

2006-05-04 Thread Talin
xahlee xah at xahlee.org writes: Today i ran into one of Guido van Rossum's blog article titled “Language Design Is Not Just Solving Puzzles” at http://www.artima.com/weblogs/viewpost.jsp?thread=147358 The confrontational tone of this post makes it pretty much impossible to have a

Re: [Python-Dev] Alternative path suggestion

2006-05-04 Thread Fredrik Lundh
Noam Raphael wrote: You can find the implementation at http://wiki.python.org/moin/AlternativePathModule?action=raw (By the way, is there some code wiki available? It can simply be a public svn repository. I think it will be useful for those things.) pastebin is quite popular:

Re: [Python-Dev] lambda in Python

2006-05-04 Thread Jay Parlar
On May 4, 2006, at 6:00 AM, Talin wrote: xahlee xah at xahlee.org writes: Today i ran into one of Guido van Rossum's blog article titled ?Language Design Is Not Just Solving Puzzles? at http://www.artima.com/weblogs/viewpost.jsp?thread=147358 The confrontational tone of this post makes it

Re: [Python-Dev] Python long command line options

2006-05-04 Thread Nick Coghlan
Heiko Wundram wrote: Anyway, back on topic, I personally agree with the people who posted to comp.lang.python that --version (and possibly --help, possibly other long parameters too) would be useful additions to Pythons command-line parameters, as it's increasingly getting more common

Re: [Python-Dev] Python long command line options

2006-05-04 Thread Georg Brandl
Heiko Wundram wrote: Anyway, back on topic, I personally agree with the people who posted to comp.lang.python that --version (and possibly --help, possibly other long parameters too) would be useful additions to Pythons command-line parameters, as it's increasingly getting more common

Re: [Python-Dev] Alternative path suggestion

2006-05-04 Thread Nick Coghlan
Stefan Rank wrote: I suggest storing the first element separately from the rest of the path. The reason for suggesting this is that you use 'os.sep' to separate elements in the normal path, but *not* to separate the first element from the rest. I want to add that people might want to

Re: [Python-Dev] Alternative path suggestion

2006-05-04 Thread Paul Moore
On 5/4/06, Nick Coghlan [EMAIL PROTECTED] wrote: My inclination was to have a PlatformPath subclass that accepted 'os', 'sep' and 'extsep' keyword arguments to the constructor, and provided the appropriate 'sep' and 'extsep' attributes (supplying 'os' would just be a shortcut to avoid

[Python-Dev] Time since the epoch

2006-05-04 Thread Sanghyeon Seo
Hello, Python library reference 6.11 says, The epoch is the point where the time starts. On January 1st of that year, at 0 hours, the time since the epoch'' is zero. For Unix, the epoch is 1970. To me this seems to suggest that the epoch may vary among platforms and implementations as long as

Re: [Python-Dev] Python long command line options

2006-05-04 Thread Fredrik Lundh
Heiko Wundram wrote: Personally, I'm +1, but wonder if it would be enough to support '--help' and '--version'. We then could cut out the best guess code and the code to enable --opt=value. The code for the above functionality is about 10-12 lines of C of the whole patch. If there's

Re: [Python-Dev] Time since the epoch

2006-05-04 Thread Thomas Wouters
On 5/2/06, Sanghyeon Seo [EMAIL PROTECTED] wrote: Hello,Python library reference 6.11 says, The epoch is the point where thetime starts. On January 1st of that year, at 0 hours, the time sincethe epoch'' is zero. For Unix, the epoch is 1970. To me this seems to suggest that the epoch may vary

Re: [Python-Dev] Alternative path suggestion

2006-05-04 Thread Stefan Rank
on 04.05.2006 16:18 Paul Moore said the following: On 5/4/06, Nick Coghlan [EMAIL PROTECTED] wrote: My inclination was to have a PlatformPath subclass that accepted 'os', 'sep' and 'extsep' keyword arguments to the constructor, and provided the appropriate 'sep' and 'extsep' attributes

Re: [Python-Dev] lambda in Python

2006-05-04 Thread Georg Brandl
xahlee wrote: I do not wish to be the subject of mobbing here. If you have opinions on what i wrote, respond to the subject on topic as with any discussion. Please do not start a gazillion war-cry on me. If you cannot tolerate the way i express my opinions, at this moment write a

Re: [Python-Dev] binary trees. Review obmalloc.c

2006-05-04 Thread Vladimir 'Yu' Stepanov
Tim Peters wrote: [Vladimir 'Yu' Stepanov] * To adapt allocation of blocks of memory with other alignment. Now alignment is rigidly set on 8 bytes. As a variant, it is possible to use alignment on 4 bytes. And this value can be set at start of the interpreter through arguments/variable

Re: [Python-Dev] lambda in Python

2006-05-04 Thread Zachery Bir
On May 4, 2006, at 11:31 AM, Georg Brandl wrote: Obviously, we all like Python the way it is and people who disagree (especially those who accuse the BDFL of being ignorant) don't belong here. If that were really the case, there wouldn't be much point to having a Python-Dev list, now would

Re: [Python-Dev] Shared libs on Linux (Was: test failures in test_ctypes (HEAD))

2006-05-04 Thread Gustavo Carneiro
On 5/3/06, Thomas Heller [EMAIL PROTECTED] wrote: [Crossposting to both python-dev and ctypes-users, please respond to the listthat seems most appropriate]Guido van Rossum wrote: File /home/guido/projects/python/trunk/Lib/ctypes/__init__.py, line 288, in __init__ self._handle =

Re: [Python-Dev] lambda in Python

2006-05-04 Thread Guido van Rossum
Reminder: the best way to get rid of a troll is to ignore him. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Alternative path suggestion

2006-05-04 Thread Guido van Rossum
On 5/4/06, Nick Coghlan [EMAIL PROTECTED] wrote: Guido has indicated strong dissatisfaction with the idea of subclassing str/unicode with respect to PEP 355. That's not my only problem with that PEP; I'm not at all convinced that an object is a better solution than a module for this particular

Re: [Python-Dev] Alternative path suggestion

2006-05-04 Thread Gustavo Niemeyer
The biggest conceptual change is that my path object is a subclass of ''tuple'', not a subclass of str. For example, Using tuples is a nice idea! Object paths using tuples is a somewhat common concept. I don't see an immediate reason to be a *subclass* of tuple, though, as opposed to using it

Re: [Python-Dev] Python long command line options

2006-05-04 Thread Guido van Rossum
On 5/4/06, Fredrik Lundh [EMAIL PROTECTED] wrote: I'm +1 on adding --help and --version, +1 on adding -? and /? for windows only, -0=slightly sceptical if adding a generic long option machinery is worth it, and -1 on a guessing machinery. I fully support Fredrik's position on this issue.

Re: [Python-Dev] Alternative path suggestion

2006-05-04 Thread Gustavo Niemeyer
You ought to have predefined classes for the standard OSes. Expecting people to know the values for sep and extsep seems unhelpful. (...) Why not something as simple as having path.sep == None meaning the default for the platform, and a defined value for otherwise? -- Gustavo Niemeyer

Re: [Python-Dev] PEP 3102: Keyword-only arguments

2006-05-04 Thread Terry Reedy
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] BJörn Lindqvist wrote: would have thought that the one obvious way to get rid of the wanky feeling would have been to write: def make_person(name, age, phone, location): ... make_person(name, age, phone, location) This

Re: [Python-Dev] Python long command line options

2006-05-04 Thread Martin v. Löwis
Fredrik Lundh wrote: I'm +1 on adding --help and --version, +1 on adding -? and /? for windows only, -0=slightly sceptical if adding a generic long option machinery is worth it, and -1 on a guessing machinery. I also agree with all these judgments. Regards, Martin

Re: [Python-Dev] [Python-checkins] r45898 - in python/trunk: Lib/test/test_os.py Lib/test/test_shutil.py Misc/NEWS Modules/posixmodule.c

2006-05-04 Thread Tim Peters
[Guido] I wonder if it's time to move the Win32 code out of posixmodule.c? It seems the current mess of #ifdefs can't be very maintainable. [Martin v. Löwis] I vaguely recall that we had considered that before, and rejected it, for some reason. Not sure what the reason was, but one might have

[Python-Dev] Confirmed: DC-area sprint on Sat. June 3rd

2006-05-04 Thread A.M. Kuchling
The DC-area sprint is now confirmed. It'll be on Saturday June 3, from 10 AM to 5 PM at the Arlington Career Center in Arlington VA. I've created a wiki page at http://wiki.python.org/moin/ArlingtonSprint; please add your name if you'll be coming. The wiki page can also be used to brainstorm

Re: [Python-Dev] Python long command line options

2006-05-04 Thread Heiko Wundram
Am Donnerstag 04 Mai 2006 16:21 schrieb Fredrik Lundh: I'm +1 on adding --help and --version, +1 on adding -? and /? for windows only, -0=slightly sceptical if adding a generic long option machinery is worth it, and -1 on a guessing machinery. I've updated the patch on the SourceForge tracker

Re: [Python-Dev] Python long command line options

2006-05-04 Thread Heiko Wundram
Am Donnerstag 04 Mai 2006 21:25 schrieb Heiko Wundram: 2) -? and /? are recognized on Windows, as are /help and /version, because / is just a different longopt-specifier on Windows for the getopt machinery in _PyOS_GetOpt Just on a side-note: I chose for '/' to be a long-opt identifier

[Python-Dev] context guards, context entry values, context managers, context contexts

2006-05-04 Thread Fredrik Lundh
fwiw, I just tested http://pyref.infogami.com/with on a live audience, and most people seemed to grok the context guard concept quite quickly. note sure about the context entry value term, though. anyone has a better idea ? /F ___ Python-Dev

Re: [Python-Dev] context guards, context entry values, context managers, context contexts

2006-05-04 Thread Phillip J. Eby
At 11:20 PM 5/4/2006 +0200, Fredrik Lundh wrote: fwiw, I just tested http://pyref.infogami.com/with on a live audience, and most people seemed to grok the context guard concept quite quickly. note sure about the context entry value term, though. anyone has a better idea ? guarded value?

Re: [Python-Dev] PEP 3102: Keyword-only arguments

2006-05-04 Thread Greg Ewing
Terry Reedy wrote: The dispute is about the sensibility and politeness of requiring a small fixed number of required, no-default args to be passed by name only There seems to be some confusion between two different subthreads here. BJörn Lindqvist seemed to be saying that instead of my