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
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
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
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
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
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
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 (==
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(
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 {}-
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)
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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:
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
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
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
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
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
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
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
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.
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
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
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
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
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,
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
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
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
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).
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
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
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/
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
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
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
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
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
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
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
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
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,
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
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
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
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
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):
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
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
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
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
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
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
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
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
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
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
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
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
401 - 500 of 689 matches
Mail list logo