Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-29 Thread Glenn Linderman
On approximately 4/29/2009 4:07 AM, came the following characters from the keyboard of R. David Murray: On Tue, 28 Apr 2009 at 20:29, Glenn Linderman wrote: On approximately 4/28/2009 7:40 PM, came the following characters from the keyboard of R. David Murray: On Tue, 28 Apr 2009 at 13:37

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-29 Thread Glenn Linderman
On approximately 4/29/2009 4:36 AM, came the following characters from the keyboard of Cameron Simpson: On 29Apr2009 02:56, Glenn Linderman wrote: os.listdir(b"") I find that on my Windows system, with all ASCII path file names, that I get quite different results when I pass

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-29 Thread Glenn Linderman
On approximately 4/29/2009 1:28 PM, came the following characters from the keyboard of Martin v. Löwis: C. File on disk with the invalid surrogate code, accessed via the str interface, no decoding happens, matches in memory the file on disk with the byte that translates to the same surrogate, acc

Re: [Python-Dev] PEP 383 (again)

2009-04-29 Thread Glenn Linderman
On approximately 4/29/2009 1:06 PM, came the following characters from the keyboard of Martin v. Löwis: > Thanks, fixed. Thanks for your fixes. They are helpful. I'm at a loss how to make the text more clear than it already is. I'm really not good at writing long essays, with a lot of expl

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-30 Thread Glenn Linderman
On approximately 4/29/2009 8:46 PM, came the following characters from the keyboard of Terry Reedy: Glenn Linderman wrote: On approximately 4/29/2009 1:28 PM, came the following characters from So where is the ambiguity here? None. But not everyone can read all the Python source code to

Re: [Python-Dev] a suggestion ... Re: PEP 383 (again)

2009-04-30 Thread Glenn Linderman
On approximately 4/29/2009 10:17 PM, came the following characters from the keyboard of Martin v. Löwis: I don't understand the proposal and issues. I see a lot of people claiming that they do, and then spending all their time either talking past each other, or disagreeing. If everyone who claim

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-30 Thread Glenn Linderman
On approximately 4/29/2009 7:50 PM, came the following characters from the keyboard of Aahz: On Thu, Apr 30, 2009, Cameron Simpson wrote: The lengthy discussion mostly revolves around: - Glenn points out that strings that came _not_ from listdir, and that are _not_ well-formed unicode (==

Re: [Python-Dev] PEP 383 and GUI libraries

2009-04-30 Thread Glenn Linderman
On approximately 4/30/2009 1:48 AM, came the following characters from the keyboard of Martin v. Löwis: I checked how GUI libraries deal with half surrogates. In pygtk, a warning gets issued to the console /tmp/helloworld.py:71: PangoWarning: Invalid UTF-8 string passed to pango_layout_set_text(

Re: [Python-Dev] PEP 383 update: utf8b is now the error handler

2009-05-06 Thread Glenn Linderman
On approximately 5/6/2009 6:33 AM, came the following characters from the keyboard of Stephen J. Turnbull: "Martin v. Löwis" writes: > In any case, Python 3.1b1 may get released today, so it's way too late > for new features in the PEP. They can wait for Python 3.2. You have convinced me that

Re: [Python-Dev] PEP 383 update: utf8b is now the error handler

2009-05-06 Thread Glenn Linderman
On approximately 5/6/2009 3:08 AM, came the following characters from the keyboard of MRAB: M.-A. Lemburg wrote: Martin v. Löwis wrote: Judging by the existing names, I think that 'surrogate' would be reasonable. It already contains the meaning of substitute, it's not too long, and the codes

Re: [Python-Dev] PEP 383 update: utf8b is now the error handler

2009-05-06 Thread Glenn Linderman
On approximately 5/6/2009 12:53 AM, came the following characters from the keyboard of Martin v. Löwis: Sorry! I suggest substituting the paragraph above for the paragraph which begins "The encode error handler interface presentlyrequires..." at line 129. Ah, ok. This was Glen Linderman's te

Re: [Python-Dev] PEP 383 update: utf8b is now the error handler

2009-05-06 Thread Glenn Linderman
On approximately 5/6/2009 12:18 PM, came the following characters from the keyboard of Zooko Wilcox-O'Hearn: On May 6, 2009, at 10:54 AM, Antoine Pitrou wrote: Zooko Wilcox-O'Hearn zooko.com> writes: I'm not thinking of API compatibility as much as data compatibility -- someone used Python

Re: [Python-Dev] PEP 383 update: utf8b is now the error handler

2009-05-06 Thread Glenn Linderman
On approximately 5/6/2009 6:06 PM, came the following characters from the keyboard of M.-A. Lemburg: Martin, please stop being silly and just change the name. Yes, please. If indeed Marc-Andre invented the codec business as he claims, he would be an appropriate person to give a fiat name t

Re: [Python-Dev] PEP 383 update: utf8b is now the error handler

2009-05-06 Thread Glenn Linderman
On approximately 5/6/2009 10:53 PM, came the following characters from the keyboard of Martin v. Löwis: The error handler designed with utf-8 in mind has no name in the encode direction and is called "utf_8b_decoder_invalid_bytes" in the decode direction. By your reasoning, *that* should be its

Re: [Python-Dev] PEP 383 update: utf8b is now the error handler

2009-05-07 Thread Glenn Linderman
On approximately 5/6/2009 11:16 PM, came the following characters from the keyboard of Martin v. Löwis: So are you proposing that I should rename the PEP 383 handler to "utf_8b_encoder_invalid_codepoints"? No, he's saying that your algorithm for choosing the PEP 383 handler should have come up

Re: [Python-Dev] PEP 383 update: utf8b is now the error handler

2009-05-07 Thread Glenn Linderman
On approximately 5/7/2009 3:27 PM, came the following characters from the keyboard of MRAB: Terry Reedy wrote: Martin v. Löwis wrote: So I'm happy to make it "surrogatepass" and "surrogateescape" as These seem adequate. It is not what I would choose or suggest, but it is adequate, and it

Re: [Python-Dev] PEP 376 : Changing the .egg-info structure

2009-05-16 Thread Glenn Linderman
On approximately 5/16/2009 9:55 AM, came the following characters from the keyboard of P.J. Eby: At 06:06 PM 5/16/2009 +0200, Tarek Ziadé wrote: Ok I've changed the PEP with all the points you mentioned, if you want to take a look. Some notes: 1. Why ';' separation, instead of tabs as in PEP

Re: [Python-Dev] PEP 376 : Changing the .egg-info structure

2009-05-16 Thread Glenn Linderman
On approximately 5/16/2009 11:58 AM, came the following characters from the keyboard of P.J. Eby: At 11:17 AM 5/16/2009 -0700, Glenn Linderman wrote: On approximately 5/16/2009 9:55 AM, came the following characters from the keyboard of P.J. Eby: At 06:06 PM 5/16/2009 +0200, Tarek Ziadé wrote

Re: [Python-Dev] PEP 376 : Changing the .egg-info structure

2009-05-16 Thread Glenn Linderman
On approximately 5/16/2009 1:08 PM, came the following characters from the keyboard of Martin v. Löwis: Alexander Shigin wrote: В Сбт, 16/05/2009 в 14:58 -0400, P.J. Eby пишет: ";" *is* valid in Windows filenames, actually. Tabs aresn't. I was sure ';' is separator for PATH in Windows. Do I mi

Re: [Python-Dev] Making the GIL faster & lighter on Windows

2009-05-26 Thread Glenn Linderman
On approximately 5/26/2009 12:48 PM, came the following characters from the keyboard of Phillip Sitbon: Hi everyone, I'm new to the list but I've been embedding Python and working very closely with the core sources for many years now. I discovered Python a long time ago when I needed to embed a

Re: [Python-Dev] io.BufferedReader.peek() Behaviour in python3.1

2009-06-16 Thread Glenn Linderman
On approximately 6/16/2009 11:20 AM, came the following characters from the keyboard of Scott David Daniels: MRAB wrote: I was thinking along the lines of: def peek(self, size=None, block=True) If 'block' is True then return 'size' bytes, unless the end of the file/stream is reached; if 'blo

Re: [Python-Dev] PEP 385: the eol-type issue

2009-08-05 Thread Glenn Linderman
On approximately 8/5/2009 4:28 AM, came the following characters from the keyboard of Dirkjan Ochtman: On Wed, Aug 5, 2009 at 13:19, Mark Hammond wrote: Configuring on each clone would certainly be sub-optimal, so the proposal is this configuration be stored in a versioned file in the repo. Ev

Re: [Python-Dev] www/svn python.org status update

2009-08-10 Thread Glenn Linderman
On approximately 8/10/2009 12:12 PM, came the following characters from the keyboard of Thomas Wouters: I'm still waiting on a replacement controller, so it wasn't to be today. Hopefully tomorrow, if the hardware supplier has one in stock. Still no news on whether we have any chance at all on get

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-09-29 Thread Glenn Linderman
On approximately 9/29/2009 1:57 PM, came the following characters from the keyboard of Steven Bethard: On Tue, Sep 29, 2009 at 1:31 PM, Paul Moore wrote: 2009/9/28 Yuvgoog Greenle : 1. There is no chance of the script killing itself. In argparse and optparse exit() is called on every parsing e

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-09-29 Thread Glenn Linderman
On approximately 9/29/2009 4:38 PM, came the following characters from the keyboard of Steven Bethard: On Tue, Sep 29, 2009 at 3:04 PM, Glenn Linderman wrote: On approximately 9/29/2009 1:57 PM, came the following characters from the keyboard of Steven Bethard: If you're not using argpar

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-01 Thread Glenn Linderman
On approximately 9/30/2009 4:03 PM, came the following characters from the keyboard of Vinay Sajip: Steven Bethard gmail.com> writes: There's a lot of code already out there (in the standard library and other places) that uses %-style formatting, when in Python 3.0 we should be encouraging {}-

Re: [Python-Dev] A new way to configure logging

2009-10-07 Thread Glenn Linderman
On approximately 10/7/2009 7:49 AM, came the following characters from the keyboard of Vinay Sajip: In outline, the scheme I have in mind will look like this, in terms of the new public API: class DictConfigurator: def __init__(self, config): #config is a dict-like object (duck-typed)

Re: [Python-Dev] A new way to configure logging

2009-10-08 Thread Glenn Linderman
On approximately 10/7/2009 10:45 PM, came the following characters from the keyboard of Vinay Sajip: Glenn Linderman g.nevcal.com> writes: But DictConfigurator the name seems misleading... like you are configuring how dicts work, rather than how logs work. Maybe with more context this

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-08 Thread Glenn Linderman
On approximately 10/8/2009 7:24 AM, came the following characters from the keyboard of Eric Smith: Vinay Sajip wrote: BTW I sent Eric a private mail re. the "0o" versus "0" issue, to see if it was worth raising an enhancement request on the bug tracker using "O" to generate compatible renderin

Re: [Python-Dev] Python Package Management Roadmap in Python Releases

2009-10-21 Thread Glenn Linderman
On approximately 10/21/2009 7:13 PM, came the following characters from the keyboard of David Lyon: On Wed, 21 Oct 2009 18:38:26 -0700, Brett Cannon wrote: We make a language here. Distutils exists as a bootstrap mechanism for the package story and for our own building needs of the stdlib.

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-20 Thread Glenn Linderman
On approximately 11/14/2009 7:29 AM, came the following characters from the keyboard of Floris Bruynooghe: Having a "Repository-URL", "Repository-Browse-URL" and a "Bug-Tracker-URL" field in PyPI would be a lot more usefule then comments and ratings. +1 Here's a thought... if the author s

Re: [Python-Dev] Quick sum up about open() + BOM

2010-01-08 Thread Glenn Linderman
On approximately 1/8/2010 3:59 PM, came the following characters from the keyboard of Victor Stinner: Hi, Thanks for all the answers! I will try to sum up all ideas here. One concern I have with this implementation encoding="BOM" is that if there is no BOM it assumes UTF-8. That is probably

Re: [Python-Dev] Quick sum up about open() + BOM

2010-01-08 Thread Glenn Linderman
On approximately 1/8/2010 5:12 PM, came the following characters from the keyboard of MRAB: Glenn Linderman wrote: On approximately 1/8/2010 3:59 PM, came the following characters from the keyboard of Victor Stinner: Hi, Thanks for all the answers! I will try to sum up all ideas here. One

Re: [Python-Dev] PyCon Keynote

2010-01-26 Thread Glenn Linderman
On approximately 1/25/2010 9:27 PM, came the following characters from the keyboard of David Lyon: Firstly, it doesn't create create desktop shortcuts - sorry users need those. Where do the programs go? So let's say that the .zip file was dropped onto the Desktop or start menu. It would h

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-26 Thread Glenn Linderman
On approximately 1/26/2010 1:27 AM, came the following characters from the keyboard of Stefan Behnel: Michael Foord, 26.01.2010 01:14: How great is the complication? Making list.pop(0) efficient sounds like a worthy goal, particularly given that the reason you don't use it is because you *kn

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Glenn Linderman
On approximately 1/26/2010 7:35 PM, came the following characters from the keyboard of David Lyon: Glen wrote: So let's say that the .zip file was dropped onto the Desktop or start menu. It would have an icon, then. It would have an icon. But nothing to identify it as a python appli

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Glenn Linderman
On approximately 1/26/2010 7:50 PM, came the following characters from the keyboard of Cameron Simpson: My point was that I look on python builtins like list and dict as highly optimised, highly efficient facilities. That means that I expect a "list" to be very very much like a linear array as on

Re: [Python-Dev] PyCon Keynote

2010-01-27 Thread Glenn Linderman
Yesterday, I said: On approximately 1/25/2010 9:27 PM, came the following characters from the keyboard of David Lyon: Firstly, it doesn't create create desktop shortcuts - sorry users need those. Where do the programs go? So let's say that the .zip file was dropped onto the Desktop or start

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-02-02 Thread Glenn Linderman
On approximately 2/2/2010 4:28 PM, came the following characters from the keyboard of Guido van Rossum: Argh. zipfiles are way to complex to be writing. Agreed. But in reading that, it somehow triggered a question: does zipimport only work for zipfiles, or does it work for any archive format

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-02-03 Thread Glenn Linderman
On approximately 2/2/2010 7:05 PM, came the following characters from the keyboard of Guido van Rossum: On Tue, Feb 2, 2010 at 5:41 PM, Glenn Linderman wrote: On approximately 2/2/2010 4:28 PM, came the following characters from the keyboard of Guido van Rossum: Argh. zipfiles are

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-02-04 Thread Glenn Linderman
On approximately 1/30/2010 4:00 PM, came the following characters from the keyboard of Barry Warsaw: When the Python executable is given a `-R` flag, or the environment variable `$PYTHONPYR` is set, then Python will create a `foo.pyr` directory and write a `pyc` file to that directory with the he

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-02-04 Thread Glenn Linderman
On approximately 2/4/2010 2:28 PM, came the following characters from the keyboard of Eric Smith: Glenn Linderman wrote: On approximately 1/30/2010 4:00 PM, came the following characters from the keyboard of Barry Warsaw: When the Python executable is given a `-R` flag, or the environment

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-02-11 Thread Glenn Linderman
On approximately 1/27/2010 1:08 AM, came the following characters from the keyboard of Glenn Linderman: Without reference to distutils, it seems the pieces are: 1) a way to decide what to include in the package 2) code that knows where to put what is included, on one or more platforms 3) the

Re: [Python-Dev] Proposal for virtualenv functionality in Python

2010-02-19 Thread Glenn Linderman
On approximately 2/19/2010 1:18 PM, came the following characters from the keyboard of P.J. Eby: At 01:49 PM 2/19/2010 -0500, Ian Bicking wrote: I'm not sure how this should best work on Windows (without symlinks, and where things generally work differently), but I would hope if this idea is mor

Re: [Python-Dev] Proposal for virtualenv functionality in Python

2010-02-19 Thread Glenn Linderman
On approximately 2/19/2010 7:52 PM, came the following characters from the keyboard of Eric Smith: Glenn Linderman wrote: On approximately 2/19/2010 1:18 PM, came the following characters from the keyboard of P.J. Eby: At 01:49 PM 2/19/2010 -0500, Ian Bicking wrote: I'm not sure how

Re: [Python-Dev] PEP 3188: Implementation Questions

2010-02-25 Thread Glenn Linderman
On approximately 2/25/2010 8:51 PM, came the following characters from the keyboard of Meador Inge: Hi All, Recently some discussion began in the issue 3132 thread (http://bugs.python.org/issue3132) regarding implementation of the new struct string syntax for PEP 3118. Mark Dickinson suggeste

Re: [Python-Dev] __file__

2010-02-26 Thread Glenn Linderman
On approximately 2/26/2010 2:55 PM, came the following characters from the keyboard of Brett Cannon: Maybe Greg's and my response to the mention of dropping this feature is too strong -- after all we're both dinosaurs. And maybe the developers who want the feature can write their own

Re: [Python-Dev] __file__

2010-02-26 Thread Glenn Linderman
On approximately 2/26/2010 5:13 PM, came the following characters from the keyboard of Brett Cannon: On Fri, Feb 26, 2010 at 15:35, Glenn Linderman <mailto:v%2bpyt...@g.nevcal.com>> wrote: On approximately 2/26/2010 2:55 PM, came the following characters from the keyboard

Re: [Python-Dev] __file__

2010-02-26 Thread Glenn Linderman
On approximately 2/26/2010 8:31 PM, came the following characters from the keyboard of Brett Cannon: I'm not sure why what you did is different than what I did, -M uses runpy which is not directly equivalent to importing. OK, that gives me some good keywords for searching documentation.

Re: [Python-Dev] __file__

2010-02-27 Thread Glenn Linderman
On approximately 2/27/2010 5:25 PM, came the following characters from the keyboard of Greg Ewing: Glenn Linderman wrote: What I did was: python -m test ren test.pyc foo.py foo.py and it worked. Source files mentioned on the command line aren't required to have a .py extension. I

Re: [Python-Dev] __file__

2010-02-28 Thread Glenn Linderman
On approximately 2/28/2010 3:22 PM, came the following characters from the keyboard of Greg Ewing: Glenn Linderman wrote: if the command line/runpy can do it, the importer could do it. Just a matter of desire and coding. Whether it is worth pursuing further depends on people's perceptio

Re: [Python-Dev] __file__ and bytecode-only

2010-03-03 Thread Glenn Linderman
On approximately 3/3/2010 5:49 PM, came the following characters from the keyboard of Barry Warsaw: On Mar 03, 2010, at 07:37 PM, Jim Jewett wrote: >I understand the need to ship without source -- but why does that >require supporting .pyc (or .pyo) -only? > >Couldn't vendors just replace th

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-18 Thread Glenn Linderman
On 3/18/2010 5:23 AM, Steven D'Aprano wrote: On Thu, 18 Mar 2010 08:58:25 am Raymond Hettinger wrote: On Mar 17, 2010, at 1:59 PM, Steven D'Aprano wrote: On Thu, 18 Mar 2010 07:44:21 am Raymond Hettinger wrote: The spectrum of options from worst to best is 1) compare but give

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-18 Thread Glenn Linderman
On 3/18/2010 12:45 PM, Robert Kern wrote: On 2010-03-18 13:27 PM, Glenn Linderman wrote: As any non-naïve float user is aware, the proper form of float comparisons is not to use < or > or == or !=, but rather, instead of using < (to follow along with your example), one should use:

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-18 Thread Glenn Linderman
On 3/18/2010 12:34 PM, Steven D'Aprano wrote: On Fri, 19 Mar 2010 05:27:06 am Glenn Linderman wrote: Do you envisage any problems from allowing this instead? Decimal('1.1')< 2.2 True Yes. As any non-naïve float user is aware, the pr

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-18 Thread Glenn Linderman
On 3/18/2010 2:48 PM, Nick Coghlan wrote: When there is a clear, correct way (based on Decimal.from_float) to make numeric comparison behave in accordance with the rules of mathematics, do we really want to preserve strange, unintuitive behaviour like the above? Cheers, Nick. I'm aware of

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-18 Thread Glenn Linderman
On 3/18/2010 6:18 PM, Antoine Pitrou wrote: Glenn Linderman g.nevcal.com> writes: On 3/18/2010 2:48 PM, Nick Coghlan wrote: When there is a clear, correct way (based on Decimal.from_float) to make numeric comparison behave in accordance with the rules of mathematics, do we rea

Re: [Python-Dev] Decimal & lt; -& gt; float comparisons in py3k.

2010-03-19 Thread Glenn Linderman
On 3/19/2010 4:50 AM, Antoine Pitrou wrote: Glenn Linderman nevcal.com> writes: On the other hand, if the default behavior is to do an implicit conversion, I don't know of any way that that could be turned into an exception for those coders that don't want or don't l

Re: [Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.

2010-03-19 Thread Glenn Linderman
On 3/19/2010 11:43 AM, Terry Reedy wrote: On 3/19/2010 2:11 PM, Antoine Pitrou wrote: Raymond Hettinger gmail.com> writes: The reason to prefer an exception is that decimal/float comparisons are more likely to be a programmer error than an intended behavior. If you really believe that, the

Re: [Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.

2010-03-19 Thread Glenn Linderman
On 3/19/2010 12:50 PM, Mark Dickinson wrote: Hah. This is a very good point, and one I'd somehow missed up until now. I don't think we*can* reasonably make equality comparisons raise NotImplemented (in either 2.x or 3.x), since that messes up containment tests: something like "1.0 in {2, Deci

Re: [Python-Dev] containment checking

2010-03-19 Thread Glenn Linderman
On 3/19/2010 3:02 PM, Antoine Pitrou wrote: Glenn Linderman g.nevcal.com> writes: > > Sounds to me like containment checking is wrong; that if it gets an > exception during the comparison that it should assume unequal, rather > than aborting, and continue to

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-19 Thread Glenn Linderman
On 3/19/2010 2:50 PM, Guido van Rossum wrote: I'd like to reboot this thread. I'll go along with that idea! I've been spinning this topic in my head for most of the morning, and I think we should seriously reconsider allowing mixed arithmetic involving Decimal, not just mixed comparisons.

Re: [Python-Dev] containment checking

2010-03-19 Thread Glenn Linderman
On 3/19/2010 4:58 PM, Antoine Pitrou wrote: Glenn Linderman g.nevcal.com> writes: > > If there's a bug in your __eq__ method, it may or may not raise an > exception, which may or may not get you wrong containment results. But > it will probably get you buggy

Re: [Python-Dev] containment checking

2010-03-19 Thread Glenn Linderman
On 3/19/2010 5:18 PM, Michael Foord wrote: will probably get you buggy results, somehow or another. That's what > design, code reviews, and testing are for. We'll have to "agree to disagree" then. If you want error silencing by default, Python is not the language you are looking for. We can a

Re: [Python-Dev] containment checking

2010-03-19 Thread Glenn Linderman
On 3/19/2010 5:20 PM, Michael Foord wrote: On 20/03/2010 00:19, Glenn Linderman wrote: On 3/19/2010 5:18 PM, Michael Foord wrote: will probably get you buggy results, somehow or another. That's what > design, code reviews, and testing are for. We'll have to "agree to disa

Re: [Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.

2010-03-19 Thread Glenn Linderman
On 3/19/2010 9:20 PM, Nick Coghlan wrote: Glenn Linderman wrote: > The same person that would expect both > > 0 == "0" > 0.0 == "0.0" > > to be False... i.e. anyone that hasn't coded in Perl for too many years. Completely diffe

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-24 Thread Glenn Linderman
On 3/24/2010 1:56 PM, Raymond Hettinger wrote: FWIW, my viewpoint on this is softening over time and I no longer feel a need to push for a new context flag. To make Decimal useful for people that want to control its numerical quality, there must be a way to exclude accidental operations,

Re: [Python-Dev] Why is nan != nan?

2010-03-25 Thread Glenn Linderman
On 3/25/2010 8:13 AM, Mark Dickinson wrote: On Thu, Mar 25, 2010 at 3:05 PM, Nick Coghlan wrote: Mark Dickinson wrote: On Thu, Mar 25, 2010 at 2:08 PM, Nick Coghlan wrote: Jesus Cea wrote: But IEEE 754 was created by pretty clever guys and sure they had a reason

Re: [Python-Dev] Why is nan != nan?

2010-03-25 Thread Glenn Linderman
On 3/25/2010 4:14 PM, Guido van Rossum wrote: On Thu, Mar 25, 2010 at 12:31 PM, Glenn Linderman wrote: It is my understand that even bit-for-bit identical NaN values will compare unequal according to IEEE 754 rules. I would have no problem with Python interning each encountered NaN value

Re: [Python-Dev] Why is nan != nan?

2010-03-25 Thread Glenn Linderman
On 3/25/2010 9:35 PM, Greg Ewing wrote: Steven D'Aprano wrote: What do we do with Decimal? Aren't we committed to matching the Decimal standard, It's been pointed out that the Decimal standard only defines some abstract operations, and doesn't mandate that they be mapped onto any particular l

Re: [Python-Dev] Thoughts fresh after EuroPython

2010-09-07 Thread Glenn Linderman
On 7/26/2010 7:36 AM, Guido van Rossum wrote: According to CSP advicates, this approach will break down when you need more than 8-16 cores since cache coherence breaks down at 16 cores. Then you would have to figure out a message-passing approach (but the messages would have to be very fast).

Re: [Python-Dev] Moving the developer docs?

2010-09-23 Thread Glenn Linderman
On 9/23/2010 7:41 AM, Barry Warsaw wrote: Our development processes are*primarily* independent of Python version, so I don't think they should be tied to our source tree, and our CPython source tree at that. I suspect the version-dependent instructions will be minimal and can be handled by the

Re: [Python-Dev] os.path.normcase rationale?

2010-09-24 Thread Glenn Linderman
On 9/24/2010 3:10 PM, Greg Ewing wrote: Paul Moore wrote: I dug into this once, and as far as I could tell, it's possible to get the information on Windows, but there's no way on Linux to "ask the filesystem". Maybe we could use a heuristic such as: 1) Search the directory for an exact matc

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Glenn Linderman
On 10/31/2010 2:02 PM, Benjamin Peterson wrote: 2010/10/31 Antoine Pitrou: > On Sun, 31 Oct 2010 16:39:44 -0400 > Eric Smith wrote: > >> What are your thoughts on adding a str.format_from_mapping (or similar >> name, maybe the suggested "format_map") to 3.2? See >> http://bugs.python.org/

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Glenn Linderman
On 10/31/2010 3:32 PM, Eric Smith wrote: On 10/31/2010 6:28 PM, Glenn Linderman wrote: On 10/31/2010 2:02 PM, Benjamin Peterson wrote: 2010/10/31 Antoine Pitrou: > On Sun, 31 Oct 2010 16:39:44 -0400 > Eric Smith wrote: > >> What are your thoughts on adding a str.format_f

[Python-Dev] Web servers, bytes, str, documentation, Python 3.2a4

2010-11-19 Thread Glenn Linderman
So maybe this is the wrong forum, if so please tell me what the right forum is for each of the various pieces. I'm assuming that I should file some bugs in the tracker, but I'm not exactly sure whether to file them on cgitb, http.server, or subprocess, or all of the above. Pretty sure there a

Re: [Python-Dev] Web servers, bytes, str, documentation, Python 3.2a4

2010-11-19 Thread Glenn Linderman
On 11/19/2010 7:48 PM, Glenn Linderman wrote: One of the cgitb outputs from my attempt to serve the binary file claims that my CGI script's output file (which comes from a subprocess PIPE) is a TextIOWrapper with encoding cp1252. Maybe that is the default that comes when a new Pyth

Re: [Python-Dev] Web servers, bytes, str, documentation, Python 3.2a4

2010-11-20 Thread Glenn Linderman
On 11/20/2010 3:38 AM, Éric Araujo wrote: Hello cgitb.enable(0,"d:\temp") Isn’t that expanded to “d:emp”? Oops. Yes, that fixes the problem with creation of the temp file, thanks for catching that. I now get a complete report of the original error in the temp file (below). I am a bit

Re: [Python-Dev] Web servers, bytes, str, documentation, Python 3.2a4

2010-11-20 Thread Glenn Linderman
On 11/20/2010 10:19 AM, Glenn Linderman wrote: Oops. Yes, that fixes the problem with creation of the temp file, thanks for catching that. I now get a complete report of the original error in the temp file (below). I am a bit less confused now... but it seems that there are still a number

Re: [Python-Dev] Web servers, bytes, str, documentation, Python 3.2a4

2010-11-21 Thread Glenn Linderman
On 11/21/2010 9:18 AM, R. David Murray wrote: I want to look at the CGI issue, but I'm not sure when I'll get to it. Actually, since this code was working before 3.x, and if email.parser can now accept binary streams, it seems like maybe the only thing that might be wrong is that presently it

[Python-Dev] is this a bug? no environment variables

2010-11-21 Thread Glenn Linderman
In reviewing my notes from my experimentations with CGIHTTPServer (Python2.6) and then http.server (Python 3.2a4), I note one behavior I haven't reported as a bug, nor do I know where to start to figure it out, other than experimentally. The experiment: launching CGIHTTPServer without environm

Re: [Python-Dev] is this a bug? no environment variables

2010-11-22 Thread Glenn Linderman
On 11/22/2010 8:33 AM, Guido van Rossum wrote: On Sun, Nov 21, 2010 at 9:40 PM, Glenn Linderman wrote: In reviewing my notes from my experimentations with CGIHTTPServer (Python2.6) and then http.server (Python 3.2a4), I note one behavior I haven't reported as a bug, nor do I know whe

Re: [Python-Dev] is this a bug? no environment variables

2010-11-23 Thread Glenn Linderman
On 11/22/2010 8:33 AM, Guido van Rossum wrote: On Sun, Nov 21, 2010 at 9:40 PM, Glenn Linderman wrote: > In reviewing my notes from my experimentations with CGIHTTPServer > (Python2.6) and then http.server (Python 3.2a4), I note one behavior I > haven't reported as a bug,

Re: [Python-Dev] is this a bug? no environment variables

2010-11-23 Thread Glenn Linderman
On 11/23/2010 3:55 AM, "Martin v. Löwis" wrote: Am 23.11.2010 11:55, schrieb Amaury Forgeot d'Arc: Hi, 2010/11/23 Glenn Linderman: File "C:\Python32\lib\random.py", line 108, in seed a = int.from_bytes(_urandom(32), 'big') WindowsError: [Error -21

Re: [Python-Dev] is this a bug? no environment variables

2010-11-23 Thread Glenn Linderman
On 11/22/2010 2:56 PM, Tim Lesher wrote: On Mon, Nov 22, 2010 at 16:54, Glenn Linderman wrote: I suppose it is possible that some environment variables are used by Python directly (but I can't seem to find a documented list of them) although I would expect that usage to be optional, with

Re: [Python-Dev] is this a bug? no environment variables

2010-11-23 Thread Glenn Linderman
On 11/23/2010 12:33 PM, "Martin v. Löwis" wrote: In any case, VS 2010 will stop using SxS for the CRT. Good news! Maybe M$VC will become a useful compiler yet again :) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/l

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Glenn Linderman
On 11/23/2010 11:34 AM, Guido van Rossum wrote: The best example of the utility of enums even for Python is bool. I resisted this for the longest time but people kept asking for it. Some properties of bool: (a) bool is a (final) subclass of int, and an int is acceptable in a pinch where a bool i

[Python-Dev] http.server - reference to bug #427345

2010-11-23 Thread Glenn Linderman
Where might I find the bug #427345 that is referred to in a comment inside http.server ? Here is a code excerpt: # throw away additional data [see bug #427345] while select.select([self.rfile._sock], [], [], 0)[0]: if not self.rfile._sock.recv(1):

Re: [Python-Dev] Web servers, bytes, str, documentation, Python 3.2a4

2010-11-23 Thread Glenn Linderman
On 11/21/2010 8:39 PM, R. David Murray wrote: On Sun, 21 Nov 2010 19:59:54 -0800, Glenn Linderman wrote: On 11/21/2010 9:18 AM, R. David Murray wrote: I want to look at the CGI issue, but I'm not sure when I'll get to it. Actually, since this code was working before 3.x, and if em

Re: [Python-Dev] constant/enum type in stdlib

2010-11-25 Thread Glenn Linderman
So the following code defines constants with associated names that get put in the repr. I'm still a Python newbie in some areas, particularly classes and metaclasses, maybe more. But this Python 3 code seems to create constants with names ... works for int and str at least. Special case for

Re: [Python-Dev] constant/enum type in stdlib

2010-11-27 Thread Glenn Linderman
On 11/27/2010 2:51 AM, Nick Coghlan wrote: Not quite. I'm suggesting a factory function that works for any value, and derives the parent class from the type of the supplied value. Nick, thanks for the much better implementation than I achieved; you seem to have the same goals as my implementat

Re: [Python-Dev] constant/enum type in stdlib

2010-11-27 Thread Glenn Linderman
On 11/27/2010 12:56 PM, Glenn Linderman wrote: On 11/27/2010 2:51 AM, Nick Coghlan wrote: Not quite. I'm suggesting a factory function that works for any value, and derives the parent class from the type of the supplied value. Nick, thanks for the much better implementation than I ach

Re: [Python-Dev] r87010 - in python/branches/py3k: Doc/library/subprocess.rst Lib/subprocess.py Lib/test/test_subprocess.py

2010-12-04 Thread Glenn Linderman
On 12/4/2010 3:07 PM, Paul Moore wrote: The original goal was for subprocess to replace os.system, os.popen, os.spawn, etc. That's never quite happened because subprocess is just a little bit too conceptually complex for those basic tasks. Is that way? I didn't find it particularly hard to lea

Re: [Python-Dev] r87010 - in python/branches/py3k: Doc/library/subprocess.rst Lib/subprocess.py Lib/test/test_subprocess.py

2010-12-05 Thread Glenn Linderman
On 12/5/2010 10:03 AM, s...@pobox.com wrote: Glenn> On 12/4/2010 3:07 PM, Paul Moore wrote: >> The original goal was for subprocess to replace os.system, os.popen, >> os.spawn, etc. That's never quite happened because subprocess is just >> a little bit too conceptually com

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-08 Thread Glenn Linderman
On 12/8/2010 4:15 AM, Vinay Sajip wrote: You're complaining about too much documentation?! Don't measure it by weight! On 12/8/2010 5:57 AM, Vinay Sajip wrote: Of course I understand I could be wrong about this, but I don't recall when a stdlib maintainer has said to me, "I want to start using

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-08 Thread Glenn Linderman
On 12/8/2010 9:43 AM, Vinay Sajip wrote: As am off-topic example, Armin Ronacher kept on saying in various posts and presentations that you couldn't use stdlib logging for web applications, that there were fundamental problems with it. But when he actually sent me his specific problem statement

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-09 Thread Glenn Linderman
On 12/9/2010 12:26 AM, Vinay Sajip wrote: Glenn Linderman g.nevcal.com> writes: > Or what am I missing? That threads are not necessarily dedicated to apps, in a real world setting. Depending on the server implementation, a single thread could be asked to handle requests for differen

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-10 Thread Glenn Linderman
On 12/10/2010 12:06 AM, Vinay Sajip wrote: > This simplistic easy usage somewhat echo's Glenn's comment on this thread about logging seeming way to daunting as presented today. It needn't be. > Indeed, and the very first code sample in the logging documentation shows exactly the simplistic

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-10 Thread Glenn Linderman
On 12/9/2010 8:29 PM, Gregory P. Smith wrote: Exactly. All I ever recommend people do is: import logging ... logging.warn('doing something a bit odd.') ... for x in thing: logging.debug('working on %r', x) ... And be done with it. If they are controlling their __main__ they'l

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-10 Thread Glenn Linderman
On 12/10/2010 12:49 PM, Antoine Pitrou wrote: And yet, I have helped many people who were baffled by exactly what > Bill observed: logging.info() didn't do anything. Maybe the default > should be INFO? Funny, because displaying only errors and silencing other messages is exactly what I expecte

<    1   2   3   4   5   6   7   >