> Why is it True by default? Do we have statistics showing that Python
> > gets more use in summer?
>
> My question exactly.
"Summer" in the USA, at least, is 238 days in 2012, while "Winter" into 2013 is
only 126 days:
>>> import datetime
>>&g
d as well.
Not to mention it doesn't work for WWW-Authenticate or TE, to give just a
couple of examples.
Robert Brewer
fuman...@aminus.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
Paul Moore wrote:
> Robert Brewer wrote:
> > P.J. Eby wrote:
> > > Also, it should be mentioned that none of this would be
> > > necessary if we could've gotten a "bytes of a known encoding"
> > > type.
> >
> > Still looking forward
P.J. Eby wrote:
> At 09:43 AM 1/7/2011 -0500, James Y Knight wrote:
> >On Jan 7, 2011, at 6:51 AM, Victor Stinner wrote:
> > > I don't understand why you are attached to this horrible hack
> > > (bytes-in-unicode). It introduces more work and more confusing
than
> > > using raw bytes unchanged.
> >
sion that floats
needed 17 decimal digits to avoid losing precision. How does one do that
efficiently if neither str nor repr return 17 digits?
Robert Brewer
fuman...@aminus.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Chris Withers wrote:
> Robert Brewer wrote:
>>>> you could switch to Python 3.1,
>>> I would love to, once Python 3 has a viable web app story...
>>
>> CherryPy 3.2 is now in beta, and mod_wsgi is nearly ready as well. Both
>> support Python 3. :)
>
the
> reload(sys) hack ends up causing problems...
>
> > Or
> > you could switch to Python 3.1,
>
> I would love to, once Python 3 has a viable web app story...
CherryPy 3.2 is now in beta, and mod_wsgi is nearly ready as well. Both
support Python 3. :)
Robert Brewer
fu
Graham Dumpleton wrote:
> 2009/5/12 Robert Brewer :
> > There's a major change in functionality in the cgi module between
> Python
> > 2 and Python 3 which I've just run across: the behavior of
> > FieldStorage.read_multi, specifically when an HTTP app accepts a
s designed to accept incremental writes,
but I haven't yet found a way to do any kind of incremental reads
from it in order to shunt the fp.read out to a tempfile again.
I'm secretly hoping Barry has a one-liner fix for this. ;)
Robert Brewer
fuman...@aminus.org
s designed to accept incremental writes,
but I haven't yet found a way to do any kind of incremental reads
from it in order to shunt the fp.read out to a tempfile again.
I'm secretly hoping Barry has a one-liner fix for this. ;)
Robert Brewer
fuman...@aminus.org
e uses for a profiling module is to compare runs on various
platforms. And please, stop perpetuating the myth that only end-users
use anything but Linux.
Robert Brewer
fuman...@aminus.org
___
Python-Dev mailing list
Python-Dev@python.org
http://m
#x27;, 'Some text'.encode('utf-16'))
The only interesting case is if you provided a *default* encoding, so that:
Message.default_header_encoding = 'utf-16'
Message.set_header('Subject', 'Some text')
...has the same effect.
But it woul
= True but it didn't seem to help.
Fixed in http://www.cherrypy.org/changeset/2096.
Robert Brewer
fuman...@aminus.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
e checked sys.platform and set shell=True for Windows.
Robert Brewer
[EMAIL PROTECTED]
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-de
gt; > 3. The Python engine has (or can easily obtain) a list of all
> > threads it created.
> > 4. It is possible to raise exceptions as the byte code is
executing.
Replace 'Python interpreter' with 'your application' and those become
relatively s
ken to doing:
self.socket._sock.close()
self.socket.close()
...in order to send the FIN I wanted ASAP.
Robert Brewer
[EMAIL PROTECTED]
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
buted yet.
But if someone wanted to do so, it's pretty simple:
>>> u'www.\u212bngstr\xf6m.com'.encode("idna")
'www.xn--ngstrm-hua5l.com'
Robert Brewer
[EMAIL PROTECTED]
___
Python-Dev mailing list
Python-
it were named 'expr'
instead of 'lambda' we wouldn't be having this discussion.
Robert Brewer
[EMAIL PROTECTED]
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
ise all flexible apps do (but especially CLI apps it seems):
frequent users love the power and high volume of options, infrequent
users despise it. If you're installing apps all day, you probably use it
a lot more often than library devs like me who use it once every other
month (if we're fo
year, I'd say 80%+ are never installed or even built--I just want to
grep the source code, and using my preferred tools, not some lame Find
command in a ZIP browser menu.
Robert Brewer
[EMAIL PROTECTED]
___
Python-Dev mailing list
Pytho
t and suggesting any topics I miss?
I'd be glad to help critique such a doc.
Robert Brewer
[EMAIL PROTECTED]
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
se work on 2.x and 3.x means I have to keep
all of the details of both Python 2 and 3 in my head all the time as I code?
not to mention litter my codebase with "# the following ugly hack lets us work
with Python 2 and 3" comments so someone else doesn't undo all my hard work
w
Eric Smith wrote:
> Robert Brewer wrote:
> > Raymond Hettinger wrote:
> >> I thought the whole point of 3.0 was a recognition that all that
> >> doubling-up was a bad thing and to be rid of it. Why make the
> >> situation worse? ISTM that we need two versions
case to be
> made that we don't need oct() at all. IIRC, unix permissions like
> 0666 were the only use case that surfaced.
Postgres bytea coercion is a frequent use case for oct() in my world.
But I agree we don't need two versions.
e, func)
return func
return decorator
I chose a renaming scheme somewhat at random. The list allows you (or
someone else ;) to call monkeypatch repeatedly on the same cls.method
(but it's not thread-safe).
And although it
n also be removed from the FunctionType
constructor arg list? If so, would I be expected to create a function
object and then use the "new" module to supply its func_closure?
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Pyt
n down in developer's
heads. Can we get that into the Language Ref somewhere? Maybe on the
http://docs.python.org/ref/try.html page?
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Python-Dev mailing list
Python-Dev@python.org
http
th __str__ instead of object, but
> what would one print in that case?
I've found "missing" to be the most common (and the most understandable)
thing to print in that case.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
__
Jon Ribbens wrote:
> > Robert Brewer <[EMAIL PROTECTED]> wrote:
> > > One solution that just occurred to me -- and that
> > > skirts the issue of choosing an interpretation --
> > > is that, when comparing date and datetime objects,
> > >
date_obj
>
> is implicitly equivalent to
>
> datetime_obj.date() < date_obj
>
> Seems a ready-made use case for that method.
+1
...and it's a decision that can be made independently
of how to add or subtract dates.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PR
ate:
That's at least one too many "must remembers" for dumb (and busy!) ol'
me. EIBTI until it's a PITA.
Is an implicit time of 0 really so surprising? It doesn't seem to be
surprising for the datetime constructor:
>>> datetime.datetime(2007, 3, 9)
datetime.dat
ase; likewise,
> choice of specific SQL library might inhibit addition of different
> libraries later.
More Against?:
Explaining "database is locked" errors (due to SQLite's exposed
multiple-readers/one-writer design) on a daily basis (FAQ entries
notwithstanding).
Robert Brewer
nvenient to work with.
I'm still wondering what "far less convenient" means. Is it simply the 4
extra key presses? I find the iter* variants to be a great solution.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Python-D
ource projects I contribute to, because I find it *far* easier to
read and write 'unnecessary' parens than remember precedence rules. But
I can understand why some people would balk at it, so +0.5 from me. ;)
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
ebuggers
> which poke into the process from the outside, rather
> than be supported natively through events). This isn't
> impossible, but it's difficult because of the large
> variety of platforms. I have access to most of the
te
struct to boot.
7. As if the above isn't enough of a dream, it would be nice to have a
bytecode tracer, which didn't bother with the f_lineno logic in
maybe_call_line_trace, but just called the hook on every instruction.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
[1
n only if a community consensus
> emerges from the thousands of random variants?
I'd like to suggest this be moved to comp.lang.python and never return.
Community consensus on syntax is a pipe dream.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
_
Barry Warsaw wrote:
> On Tue, 2006-02-07 at 16:01 -0800, Robert Brewer wrote:
>
> > Perhaps, but please keep in mind that the smtpd module uses
> > both, currently, and would have to be rewritten if either is
> > "removed".
>
> Would that really be a
-- basically most of
> asyncore's guts were replaced with more advanced Zope code, but the
> API was maintained for compatibility reasons. A nightmare.
Perhaps, but please keep in mind that the smtpd module uses both, currently,
and would have to be rewritten if either is "remo
= expr(x: x + 1)
...where expr() does early binding like dejavu.logic does. [Looking back
over my logic module, I'm noticing it requires boolean return values,
but it would not be difficult to extend to return abitrary values--even
easier if it were rewritten as builtin functionality. Guess I need to
t;if" statements will raise TypeError if start or end are dates? That would be a sad day for Python. Perhaps you're saying that there is a "meaningful comparison" between None and anything else, but please clarify if so.
Robert Brewer
Sy
n is not an error (like the
aforementioned HTTPRedirect). ;)
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail
ey could just stick a reference to it into a threading.local object and instantly have safe, concurrent access to it.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.pyth
've done everyone a favour. Sometimes no
> decision is worse than the wrong decision ;-).
Exactly how I felt about bringing the decorator decision to a close. ;)
Congratulations to you both!
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
__
like the second form better, because even intermediate Pythonistas
sometimes make a mistake between:
raise ValueError, A
and
raise (ValueError, A)
I'd like to see the first form removed in Python 3k, to help reduce the
ambiguity. But PEP 8 taking a stand on it would be a good
oing for it are Dictionary.com (which aggregates lots of questionable
sources), Rhymezone, and LookWAYup. I think "raisable" is the clear
winner.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
___
Python-Dev mailing list
Pyt
ade a patch for that one the next day, by the way. #1203094
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
P.S. Do you have a valid email address, RB? I wasn't able to fix up your
nospam address by hand.
___
Python-Dev mailing l
(*exc)". Assuming that, then "exc =
(None, None, None)" makes the most sense. If exc_info() is going to be
passed as a single arg, then I'd rather have the default "exc = ()", so
I can simply check "if exc:" in the __exit__ method.
Robert Brewer
System Archi
o recompile the template function every time
that it's executed with a different block. Call it a "Python
_re_processor" ;). Although you could memoize the the resultant
bytecode, etc., it would still be pretty slow, and you wouldn't be able
to alter (rebind) the thunk
g:
else:
continue
[Guido]
> Try to make sure that it can be used in a "statement context"
> as well as in an "expression context".
...
> I'm trying to sensitize you to potential uses like this:
>
> def foo(b):
>
Shane Hathaway wrote:
> Robert Brewer wrote:
> > So currently, all subclasses just override __set__, which leads to a
> > *lot* of duplication of code. If I could write the base
> class' __set__
> > to call "macros" like this:
> >
> > def
), and is currently fragile when overriding __set__ (due
to duplicated code).
I'm sure there are other cases with both 1) a relatively invariant
series of statements and 2) complicated extensions of that series. Of
course, you can do the above with compile() and exec. Maybe I'm just
ave
for line in f:
print line[:line.find(":")]
defmacro cleanup:
print "file closed successfully"
safe_file(filename, body, cleanup)
If macros were to be evaluated at runtime, I'd certainly want to see
them be first-class (mea
client had
multiple multigig csv's which needed deduplicating, but they were all
from different sources and therefore in different formats. It would have
cost me many more hours without the Sniffer. Please keep it. <:)
Robert Brewer
MIS
Amor Ministries
[EMAIL PROTECTED]
are what PR is made
of. Imagine Bush's next Executive Order being titled "Making American
[Business|Military|People] Not Suck"... ;)
Robert Brewer
MIS
Amor Ministries
[EMAIL PROTECTED]
___
Python-Dev mailing list
[EMAIL PROTECTED]
http:
55 matches
Mail list logo