annoyingly when a single process changes a
file, then attempts to import it. If you open a file, write to it,
explicitly close it, and then load it, you would expect to read back
what you wrote, not the version that was there previously.
Chris Angelico
and mythical varargs token), but in their basics
they will be similar. The name is worth keeping.
Chris Angelico
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman
and
partly drive our code). But features enabling that needn't be core; I
wouldn't object to having to get some third-party add-ons to make it
all work.
Chris Angelico
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman
On Fri, Mar 23, 2012 at 6:50 AM, Glenn Linderman v+pyt...@g.nevcal.com wrote:
3. Make the sidebar separately scrollable, so that it stays visible when
scrolling down in the text. This would make it much easier to jump from
section to section, if the TOC didn't get lost in the process.
-1. The
that generates .gitignore and .bzrignore from
.hgignore? That ought to solve the problem - take the former two out
of the repository, and everyone who wants to use git or bzr can simply
generate them on requirement.
Chris Angelico
___
Python-Dev mailing list
be the
same as =True, and =False wouldn't be. And get_clock(monotonic=No,
you idiot, I want one that ISN'T) would... be stupid. But it'd still
function :)
Chris Angelico
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo
On Wed, Apr 11, 2012 at 4:49 PM, Jim Jewett jimjjew...@gmail.com wrote:
Clock:
An instrument for measuring time. Different clocks have different
characteristics; for example, a clock with nanonsecond precision
Small typo. Otherwise, excellent reference document - thank you! Well
worth
be used.
Chris Angelico
___
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
On Tue, Apr 17, 2012 at 2:48 PM, Cameron Simpson c...@zip.com.au wrote:
On 16Apr2012 01:25, Victor Stinner victor.stin...@gmail.com wrote:
| I suppose that most people don't care that resolution and
| precision are different things.
If we're using the same definitions we discussed offline,
On Thu, Apr 19, 2012 at 12:47 AM, Guido van Rossum gu...@python.org wrote:
I don't believe PEP 8 requires whitespace around all binary operators.
Where do you read that?
Quoting from http://www.python.org/dev/peps/pep-0008/#other-recommendations
(with elision):
Use spaces around arithmetic
.
Following or preceding? Either works, but there's a slight shift of
meaning depending on which punctuation gets the upgrade. What was the
original intent of the paragraph?
Chris Angelico
___
Python-Dev mailing list
Python-Dev@python.org
http
On Fri, Apr 20, 2012 at 1:00 AM, Éric Araujo mer...@netwok.org wrote:
Hi,
+- If operators with different priorities are used, consider adding
+ whitespace around the operators with the lowest priority(ies). This
+ is very much to taste; however, never use more than one space, and
+ always
On Wed, Apr 25, 2012 at 1:44 PM, Stephen J. Turnbull step...@xemacs.org wrote:
I don't know of any webmail implementations that provide
reply-to-list, so a lot of us end up using reply-to-all. Cleaning up
the headers requires at least deleting the To (which is where the
author ends up), and
on Windows
and run into one, I open it in Wordpad (or, if I have one, a dedicated
programming editor like SciTE or the Open Watcom editor). AFAIK only
Notepad (of standard Windows utilities) has trouble.
Not sure if that makes a difference or not.
Chris Angelico
On Fri, May 4, 2012 at 1:28 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote:
It's only really an issue for new / inexperienced users, I agree. Since these
files are installed only on Windows systems, there's no reason for them not to
have the native line endings.
Then sure, doesn't make a lot of
On Sat, May 5, 2012 at 4:07 AM, Edward C. Jones edcjo...@comcast.net wrote:
/usr/include/bzlib.h
/usr/lib/x86_64-linux-gnu/libbz2.a
/usr/lib/x86_64-linux-gnu/libbz2.so
/lib/x86_64-linux-gnu/libbz2.so.1
/lib/x86_64-linux-gnu/libbz2.so.1.0
/lib/x86_64-linux-gnu/libbz2.so.1.0.4
I have an
On Sat, May 5, 2012 at 6:49 AM, Carl Meyer c...@oddbird.net wrote:
2) In addition to the above, introduce a versioning marker in the standard
library (is there one already?) and have some code somewhere (insert
hand-waving here) check sys.version_info against the stdlib version, and
fail fast
On Sun, May 20, 2012 at 4:43 AM, Glyph gl...@twistedmatrix.com wrote:
Right now, e.g. http://docs.python.org/tutorial/index.html directly renders
a page. I suggest that this be changed to a redirect to
http://docs.python.org/release/2.7/tutorial/index.html. The fact that
people can
On Sun, Jun 24, 2012 at 9:40 AM, Christian Heimes li...@cheimes.de wrote:
+1 for the general idea and for using Py_LIMITED_API. I still like my
idea of a simple macro based on Include/patchlevel.h, for example:
#define Py_API_VERSION(major, minor, micro) \
(((major) 24) | ((minor) 16) |
On Sun, Jun 24, 2012 at 5:08 PM, Nick Coghlan ncogh...@gmail.com wrote:
On Sun, Jun 24, 2012 at 5:00 PM, Martin v. Löwis mar...@v.loewis.de wrote:
This strikes me as in opposition to the Python-level policy of duck
typing. Would it be more appropriate to, instead of asking if it's
Python
On Fri, Jun 21, 2013 at 11:06 AM, Nick Coghlan ncogh...@gmail.com wrote:
On 21 June 2013 01:04, Thomas Wouters tho...@python.org wrote:
If the .py file is going to be wrong or incomplete, why would we want to
keep it -- or use it as fallback -- at all? If we're dead set on having a
.py file
On Wed, Jul 24, 2013 at 7:12 PM, Bohuslav Kabrda bkab...@redhat.com wrote:
- What should user get after using yum install python?
There are basically few ways of coping with this:
1) Just keep doing what we do, eventually far in the future drop python
package and never provide it again (= go
On Thu, Jul 25, 2013 at 2:21 AM, Laurent Gautier lgaut...@gmail.com wrote:
- errors that are typical of Python 2 script running with Python
3-specific are probably limited (e.g., use of unicode, use of xrange,
etc...)
The most common, in interactive scripts at least, is likely to be:
print
On Fri, Jul 26, 2013 at 12:29 AM, Eli Bendersky eli...@gmail.com wrote:
Hi all,
I've been looking for a Github mirror for Python, and found two:
* https://github.com/python-git/python has a lot of forks/watches/starts but
seems to be very out of date (last updated 4 years ago)
*
On Thu, Aug 1, 2013 at 5:58 PM, Alexander Shorin kxe...@gmail.com wrote:
fun = lambda i: i[1]
for key, items in groupby(sorted(items, key=fun), key=fun):
print(key, ':', list(items))
I'd do a direct translation to def here:
def fun(i): return i[1]
for key, items in groupby(sorted(items,
On Wed, Aug 14, 2013 at 6:42 PM, Nick Coghlan ncogh...@gmail.com wrote:
That would be PEP 4 :)
What's the normal way to update a PEP?
... proposals for deprecating modules MUST be made by providing a
change to the text of this PEP, which SHOULD be a patch posted to
SourceForge...
Would
On Thu, Aug 22, 2013 at 11:45 PM, Michael Foord
fuzzy...@voidspace.org.uk wrote:
On 22 Aug 2013, at 14:00, Petri Lehtinen pe...@digip.org wrote:
Django's deprecation policy works like this: They deprecate something
in version A.B. It still works normally in A.B+1, generates a
(silenced)
On Thu, Oct 3, 2013 at 11:09 PM, Игорь Васильев vasilyev_i...@inbox.ru wrote:
When we adding class to integer we have both slotv and slotw. x = slotv(v,
w); - returns Py_NotImplemented.
But in this case we should execute x = slotw(v, w); and function should be
completed in the same way as when
On Wed, Nov 20, 2013 at 11:03 PM, Steven D'Aprano st...@pearwood.info wrote:
I *will* get confused over which
direction is encoding and which is decoding. (Removing .decode()
from the (unicode) str type in 3 does help a lot, if I have a Python 3
interpreter running to check against.)
It took
On Fri, Nov 22, 2013 at 10:32 PM, Nick Coghlan ncogh...@gmail.com wrote:
A few folks overreacted in their concern about the community confusion
such a move would inevitably create - *anything* called Python 2.8
is going to give the impression that we've changed our mind about 2.7
being the
On Fri, Nov 29, 2013 at 10:08 PM, anatoly techtonik techto...@gmail.com wrote:
About ill fated initiatives. I don't like when people prematurely close
tickets
without waiting for the mutual agreement that the problem is solved. Perhaps
trackers should have personal agree/disagree/meh flags to
On Fri, Dec 6, 2013 at 2:29 AM, Martin v. Löwis mar...@v.loewis.de wrote:
Am 05.12.13 16:21, schrieb Vajrasky Kok:
On Thu, Dec 5, 2013 at 11:06 PM, Martin v. Löwis mar...@v.loewis.de
wrote:
Can you please phrase your question more explicit? What is it that
you want to be done before writing
In another thread it was suggested that a new buildbot running as root
would be of value. I've spun up a virtual machine running Debian
Wheezy amd64, have installed buildbot from the repository (version
0.8.6p1), and am ready to have it join the farm. How do I go about
doing this?
I've followed
On Wed, Dec 18, 2013 at 8:43 PM, Serhiy Storchaka storch...@gmail.com wrote:
18.12.13 04:40, Benjamin Peterson написав(ла):
Mostly yes, but at least you could tell people to upgrade straight to
2.7.7 and skip 2.7.6.
It'll make the people to postpone the upgrade to 2.7.6 (which fixes many
On Wed, Dec 18, 2013 at 9:26 PM, Daniel Pocock dan...@pocock.com.au wrote:
b) when each worker thread starts, call
PyThreadState_New(mInterpreterState) and save the result in a thread
local mPyThreadState
c) use the mPyThreadState with PyEval_RestoreThread and
PyEval_SaveThread before and
On Sun, Dec 8, 2013 at 12:35 AM, Chris Angelico ros...@gmail.com wrote:
In another thread it was suggested that a new buildbot running as root
would be of value. I've spun up a virtual machine running Debian
Wheezy amd64, have installed buildbot from the repository (version
0.8.6p1), and am
On Tue, Dec 31, 2013 at 12:05 AM, Chris Angelico ros...@gmail.com wrote:
On Sun, Dec 8, 2013 at 12:35 AM, Chris Angelico ros...@gmail.com wrote:
In another thread it was suggested that a new buildbot running as root
would be of value. I've spun up a virtual machine running Debian
Wheezy amd64
On Tue, Dec 31, 2013 at 5:18 AM, Christian Heimes christ...@python.org wrote:
The buildbot is missing some vital header files. Please run:
# apt-get build-dep python3.3
to install all required dependencies.
Debian Wheezy doesn't package 3.3 but only 3.2, so I grabbed 3.2's
build-deps.
Does Buildbot retain a constant TCP socket to its server? I'm seeing this:
http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.3/builds/0
Results:
Retry exception slave lost
I have two internet connections; one is faster, but tends to drop
socket connections after a few
On Tue, Dec 31, 2013 at 11:42 AM, Antoine Pitrou solip...@pitrou.net wrote:
On Tue, 31 Dec 2013 11:24:26 +1100
Chris Angelico ros...@gmail.com wrote:
Does Buildbot retain a constant TCP socket to its server? I'm seeing this:
http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.3
On Tue, Dec 31, 2013 at 12:35 PM, Zach Ware
zachary.ware+py...@gmail.com wrote:
Debian Wheezy doesn't package 3.3 but only 3.2, so I grabbed 3.2's
build-deps. They're now installed, so the next build should have
everything for that. Does anyone happen to know what (if anything) 3.3
needs that 3.2
On Thu, Jan 2, 2014 at 9:17 AM, Martin v. Löwis mar...@v.loewis.de wrote:
So it should be able to handle a failover from one link to
the other, but it's certainly better to bind it to the more
reliable transport. I believe you can somehow configure the
frequency of ping messages so that you
On Fri, Jan 3, 2014 at 1:18 PM, Dan Stromberg drsali...@gmail.com wrote:
I don't know much (if anything ^_^) about survey methodology. I just
created a 9 question survey and tossed it at a few places that
Pythonistas hang out.
Specifically, your methodology was to post the link to python-list
On Sun, Jan 5, 2014 at 2:36 AM, Hugo G. Fierro h...@gfierro.com wrote:
I am trying to download an HTML document. I get an HTTP 301 (Moved
Permanently) with a UTF-8 encoded Location header and http.client decodes it
as iso-8859-1. When there's a non-ASCII character in the redirect URL then I
The first build my new root buildbot did showed errors in the 2.7 test
suite, but I thought little of it as quite a few other 2.7 buildbots
are showing red, too. But it seems they're showing different errors,
so there might be something wrong with the setup.
On Mon, Jan 6, 2014 at 7:11 PM, Christian Heimes christ...@python.org wrote:
On 06.01.2014 08:09, Chris Angelico wrote:
Then further down, several SSL tests attempt:
s.connect_ex((svn.python.org, 444)))
and get back EAGAIN when they're expecting ECONNREFUSED. Possibly my
firewall's
On Mon, Jan 6, 2014 at 7:58 PM, Christian Heimes christ...@python.org wrote:
Interesting, maybe it's a general NAT issue? So far I have seen the issue on
Windows only. What kind of VM are you using? I'm using virtualbox for my
Windows VMs.
It's Oracle VirtualBox v4.2.20 r90963.
Just backport
On Tue, Jan 7, 2014 at 12:44 AM, Antoine Pitrou solip...@pitrou.net wrote:
BTW, there's a subtlety here: ``%s`` currently means insert the result
of calling __str__, but bytes formatting should *not* call __str__.
Since it derives from the C printf notation, it means insert string
here. The
On Wed, Jan 8, 2014 at 9:12 PM, Victor Stinner victor.stin...@gmail.com wrote:
IMO some formatting commands must not be implemented. For example,
alignment is used to display something on screen, not in network
protocols or binary file formats.
Must not, or need not? I can understand that
On Thu, Jan 9, 2014 at 11:21 AM, MRAB pyt...@mrabarnett.plus.com wrote:
On the other hand:
I need a new battery.
What kind of battery?
I don't care!
Or, bringing it back to Python: How do you write a set out to a file?
foo = {1, 2, 4, 8, 16, 32}
open(foo.txt,w).write(foo) #
On Thu, Jan 9, 2014 at 5:50 PM, Lennart Regebro rege...@gmail.com wrote:
To be honest, you can define text as A stream of bytes that are split
up in lines separated by a linefeed, and do some basic text
processing like that. Just very *basic*, but still. Replacing
characters. Extracting
On Fri, Jan 10, 2014 at 11:53 AM, anatoly techtonik techto...@gmail.com wrote:
2. introduce autodetect mode to open functions
1. read and transform on the fly, maintaining a buffer that
stores original bytes
and their mapping to letters. The mapping is updated as bytes
On Fri, Jan 10, 2014 at 1:39 PM, Steven D'Aprano st...@pearwood.info wrote:
On Fri, Jan 10, 2014 at 12:22:02PM +1100, Chris Angelico wrote:
On Fri, Jan 10, 2014 at 11:53 AM, anatoly techtonik techto...@gmail.com
wrote:
2. introduce autodetect mode to open functions
1. read
On Mon, Jan 13, 2014 at 4:57 AM, Juraj Sukop juraj.su...@gmail.com wrote:
On Sun, Jan 12, 2014 at 6:22 PM, Steven D'Aprano st...@pearwood.info
wrote:
First, utf16_string confuses me. What is it? If it is a Unicode
string, i.e.:
It is a Unicode string which happens to contain code points
On Tue, Jan 14, 2014 at 10:48 AM, Jim J. Jewett jimjjew...@gmail.com wrote:
The barrier for entry to the standard library is higher than mere
usefulness.
Agreed. But most programs will need it, and people will either
include (the same) 3rd-party library themselves, or write their
own
And now for something completely different.
My root buildbot is finally now able to telnet out and get Connection
refused errors. (For the curious, the VirtualBox NAT mode doesn't
work properly, but the new NAT Network mode does. Why? I have no
idea. But if anyone else is having the same problem,
On Tue, Jan 14, 2014 at 2:14 PM, Zachary Ware
zachary.ware+py...@gmail.com wrote:
On Mon, Jan 13, 2014 at 6:48 PM, Chris Angelico ros...@gmail.com wrote:
And secondly, how can I run the tests manually? I can't find a binary
inside the buildarea tree. Does it get deleted afterward?
Yes, that's
On Tue, Jan 14, 2014 at 2:03 PM, Terry Reedy tjre...@udel.edu wrote:
On 1/13/2014 7:48 PM, Chris Angelico wrote:
ValueError: max() arg is an empty sequence
try:
g = max(self.saved_groups) + 1
except ValueError:
g = 1
Unless someone says that it is a bug for posix.getgroups
On Wed, Jan 15, 2014 at 11:22 PM, Martin v. Löwis mar...@v.loewis.de wrote:
I don't think that it is possible to write an interpreter that is fully
compatible for all it accepts. Would you think that the program
print(repr(2**80).endswith(L))
is in the subset that should be supported by both
On Thu, Jan 16, 2014 at 1:25 AM, Eric V. Smith e...@trueblade.com wrote:
Easiest fix for that would be to have long.__repr__ omit the L tag.
Then it'll do the same as it would in Py3.
I think Martin's point is not this specific thing, but that such a
subset would be useless. Would you drop
On Sat, Jan 18, 2014 at 12:51 PM, Ethan Furman et...@stoneleaf.us wrote:
It seems there are two possibilities with %a:
1) have it be ascii(repr(obj))
Wouldn't that be redundant? ascii() is already repr()-like.
ChrisA
___
Python-Dev mailing list
On Sat, Jan 18, 2014 at 8:02 PM, Serhiy Storchaka storch...@gmail.com wrote:
2. I'm not use any IDE, but if you use, it can be important for you. If IDE
shows sources tree, unlikely you want to see generated *.clinic.c files in
them. This will increase the list of sources almost twice.
A point
On Wed, Jan 22, 2014 at 11:15 PM, Donald Stufft don...@stufft.io wrote:
Do you really think those people would be making the same complaints
if they could restore the previous behavior with a simple boolean flag
delivered either via environment variable or in their own code?
You assume that
On Thu, Jan 23, 2014 at 1:08 AM, Jesse Noller jnol...@gmail.com wrote:
Now, maybe it wouldn't be a problem if the fix is an environment
variable, but imagine a thousand-computer deployment and you have to
tweak the environment on all of them. Feel like doing that just
because the newest Python
On Sat, Jan 25, 2014 at 3:38 AM, Antoine Pitrou solip...@pitrou.net wrote:
On Fri, 24 Jan 2014 18:32:17 +0200
Ram Rachum r...@rachum.com wrote:
Question: Why is there no str.rreplace in Python?
What would it do?
(also, I think such questions are better asked on python-ideas)
Or python-list.
On Sat, Jan 25, 2014 at 4:19 AM, Ram Rachum r...@rachum.com wrote:
I now looked at the 17 most recent python-list threads. Out of them:
- 58% are about third-party packages.
- 17% are off-topic (not even programming related)
- 11% are 2-vs-3 discussions
- 5% are job offers.
- 5% (which
On Sat, Jan 25, 2014 at 3:07 PM, Larry Hastings la...@hastings.org wrote:
What should it be?
A) pydoc and help() should not show bound parameters in the signature, like
inspect.signature.
B) pydoc and help() should show bound parameters in the signature, like
inspect.getfullargspec.
Vote
On Mon, Feb 10, 2014 at 5:23 PM, anatoly techtonik techto...@gmail.com wrote:
http://status.python.org/ shows all green
https://pypi.python.org/pypi/gazest shows
Error 503 backend read error
backend read error
Guru Meditation:
XID: 2792709923
Working for me. But then, your email only
On Fri, Feb 14, 2014 at 7:04 PM, Chris Withers ch...@simplistix.co.uk wrote:
To implement __lt__ in Python 2, I could do:
def __lt__(self, other):
if not isinstance(other, Range):
return True
return ((self._lower, self._upper, self._bounds)
On Fri, Feb 14, 2014 at 9:20 PM, Antoine Pitrou solip...@pitrou.net wrote:
Hmm, it seems you're right, but I'm quite sure some DBMSes have a
consistent way of ordering NULLs when using ORDER BY on a nullable
column.
Yes, and I believe it's part of the SQL-92 spec. Certainly here's
PostgreSQL's
On Fri, Feb 14, 2014 at 9:42 PM, Nick Coghlan ncogh...@gmail.com wrote:
IIRC, MySQL and PostgreSQL sort them in the opposite order from each
other
Ouch! You're right:
http://dev.mysql.com/doc/refman/5.7/en/working-with-null.html
When doing an ORDER BY, NULL values are presented first if you
On Sat, Feb 15, 2014 at 4:14 AM, Chris Barker chris.bar...@noaa.gov wrote:
(though it could get a bit tricky -- what would AlwaysGreater float('inf)
evaluate to?
It'd be true. AlwaysGreater is greater than infinity. It is greater
than float(nan). It is greater than the entire concept of
On Tue, Feb 18, 2014 at 1:30 AM, M.-A. Lemburg m...@egenix.com wrote:
Also think of the implications of changing None at this point. It would
allow us to write programs that work Python = 3.5 and Python = 2.7, but
fail mysteriously in all other versions in between. What a mess that would
On Wed, Feb 19, 2014 at 3:10 AM, Mark Lawrence breamore...@yahoo.co.uk wrote:
Sorry if this has already been suggested, but why not introduce a new
singleton to make the database people happier if not happy? To avoid
confusion call it dbnull? A reasonable compromise or complete cobblers? :)
Apologies if this is misdirected!
I notice the switch to the new python.org web site has happened; but
now PEPs are simply 404:
http://www.python.org/dev/peps/pep-0008/
However, trimming the URL offers a redirect:
http://www.python.org/dev/peps/
-
http://legacy.python.org/dev/peps/
from
On Thu, Feb 20, 2014 at 10:25 AM, Chris Angelico ros...@gmail.com wrote:
I notice the switch to the new python.org web site has happened; but
now PEPs are simply 404:
http://www.python.org/dev/peps/pep-0008/
However, trimming the URL offers a redirect:
http://www.python.org/dev/peps
PEP: 463
Title: Exception-catching expressions
Version: $Revision$
Last-Modified: $Date$
Author: Chris Angelico ros...@gmail.com
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 15-Feb-2014
Python-Version: 3.5
Post-History: 16-Feb-2014, 21-Feb-2014
Abstract
Just
On Fri, Feb 21, 2014 at 3:54 PM, Ethan Furman et...@stoneleaf.us wrote:
(I'll vote on the syntax when the bikeshedding begins ;).
Go get the keys to the time machine! Bikeshedding begins a week ago.
ChrisA
___
Python-Dev mailing list
On Fri, Feb 21, 2014 at 10:35 PM, Nick Coghlan ncogh...@gmail.com wrote:
On 21 February 2014 13:15, Chris Angelico ros...@gmail.com wrote:
PEP: 463
Title: Exception-catching expressions
Great work on this Chris - this is one of the best researched and
justified Python syntax proposals I've
On Fri, Feb 21, 2014 at 11:37 PM, Paul Moore p.f.mo...@gmail.com wrote:
On 21 February 2014 11:35, Nick Coghlan ncogh...@gmail.com wrote:
Just as PEP 308 introduced a means of value-based conditions in an
expression, this system allows exception-based conditions to be used
as part of an
On Sat, Feb 22, 2014 at 12:53 AM, Nick Coghlan ncogh...@gmail.com wrote:
On 21 February 2014 22:42, Chris Angelico ros...@gmail.com wrote:
People can already write:
if (x if y else z):
without the parens, and it works. Readability suffers when the same
keyword is used twice (here if rather
On Sat, Feb 22, 2014 at 1:59 AM, Chris Angelico ros...@gmail.com wrote:
I've spent the better part of the last hour debating this in my head.
It's basically a question of simplicity versus future flexibility:
either keep the syntax clean and deny the multiple-except-clause
option, or mandate
On Sat, Feb 22, 2014 at 1:50 AM, Antoine Pitrou solip...@pitrou.net wrote:
On Sat, 22 Feb 2014 00:28:01 +1000
Nick Coghlan ncogh...@gmail.com wrote:
Neither of these objections addresses the problems with the status quo,
though:
- the status quo encourages overbroad exception handling (as
On Sat, Feb 22, 2014 at 1:03 AM, Eli Bendersky eli...@gmail.com wrote:
Chris, while I also commend you for the comprehensive PEP, I'm -1 on the
proposal, for two main reasons:
1. Many proposals suggest new syntax to gain some succinctness. Each has to
be judged for its own merits, and in this
On Sat, Feb 22, 2014 at 1:22 AM, Rob Cliffe rob.cli...@btinternet.com wrote:
Small point: in one of your examples you give a plug for the PEP note the
DRY improvement.
I would suggest that similarly
perhaps in your Lib/tarfile.py:2198 example you point out the increase
in readability due
On Sat, Feb 22, 2014 at 1:34 AM, Brett Cannon br...@python.org wrote:
While I like the general concept, I agree that it looks too much like a
crunched statement; the use of the colon is a non-starter for me. I'm sure
I'm not the only one whose brain has been trained to view a colon in Python
On Sat, Feb 22, 2014 at 2:19 AM, Brett Cannon br...@python.org wrote:
I understand you are arguing that a try expression will lead to people just
doing `something() except Exception: None` or whatever and that people will
simply get lazy and not think about what they are doing with their
On Sat, Feb 22, 2014 at 3:46 AM, Eric Snow ericsnowcurren...@gmail.com wrote:
Be sure to capture in the PEP (within reason) a summary of concerns
and rebuttals/acquiescence. Eli's, Brett's, and Antoine's concerns
likely reflect what others are thinking as well. The PEP and its
result will be
On Sat, Feb 22, 2014 at 4:32 AM, Antoine Pitrou solip...@pitrou.net wrote:
value = (expr except Exception then default)
+0.5
But I'm aware it requires reserving then as a keyword, which might
need a prior SyntaxWarning.
There are no instances of then used as a name in the Python stdlib,
I
to
bubble up.
import pwd
pwd.getpwnam(rosuav)
pwd.struct_passwd(pw_name='rosuav', pw_passwd='x', pw_uid=1000,
pw_gid=1000, pw_gecos='Chris Angelico,,,', pw_dir='/home/rosuav',
pw_shell='/bin/bash')
pwd.getpwnam(spam)
Traceback (most recent call last):
File stdin, line 1, in module
KeyError
On Sat, Feb 22, 2014 at 9:06 AM, Greg Ewing greg.ew...@canterbury.ac.nz wrote:
Nick Coghlan wrote:
On 21 February 2014 13:15, Chris Angelico ros...@gmail.com wrote:
Generator expressions require parentheses, unless they would be
strictly redundant. Ambiguities with except expressions could
On Sat, Feb 22, 2014 at 10:29 AM, Greg Ewing
greg.ew...@canterbury.ac.nz wrote:
Antoine Pitrou wrote:
lst = [1, 2]
value = lst[2] except IndexError: No value
the gain in concision is counterbalanced by a loss in
readability,
This version might be more readable:
value = lst[2]
On Sat, Feb 22, 2014 at 12:10 PM, Glenn Linderman v+pyt...@g.nevcal.com wrote:
Here's a challenge: There has been a big thread about None versus (SQL)
Null. Show how an except: expression can help the DB API more easily convert
from using None to using a new Null singleton, and you'll have a
On Sat, Feb 22, 2014 at 12:55 PM, Greg Ewing
greg.ew...@canterbury.ac.nz wrote:
Steven D'Aprano wrote:
result = computation(
int(arg) except ValueError: abort(Invalid int)
)
Actually, not quite so nice as I first thought, since you're relying on
the
On Sat, Feb 22, 2014 at 1:07 PM, Victor Stinner
victor.stin...@gmail.com wrote:
At the first read, I'm unable to understand this long expression. At
the second read, I'm still unable to see which instruction will be
executed first: lvl1[key] or lvl2[key]?
The advantage of the current syntax
On Sat, Feb 22, 2014 at 3:04 PM, Chris Angelico ros...@gmail.com wrote:
On Sat, Feb 22, 2014 at 1:07 PM, Victor Stinner
victor.stin...@gmail.com wrote:
At the first read, I'm unable to understand this long expression. At
the second read, I'm still unable to see which instruction
On Sat, Feb 22, 2014 at 4:01 PM, Steven D'Aprano st...@pearwood.info wrote:
(Chris, I think that ought to go in the motivation section of the PEP.)
Added to my draft, and here's the peps diff:
diff -r c52a2ae3d98e pep-0463.txt
--- a/pep-0463.txt Fri Feb 21 23:27:51 2014 -0500
+++ b/pep-0463.txt
On Sat, Feb 22, 2014 at 8:20 PM, Antoine Pitrou solip...@pitrou.net wrote:
On Sat, 22 Feb 2014 16:12:27 +0900
Stephen J. Turnbull step...@xemacs.org wrote:
Note in support: I originally thought that get methods would be more
efficient, but since Nick pointed out that haveattr is implemented
On Sat, Feb 22, 2014 at 10:57 AM, Greg Ewing
greg.ew...@canterbury.ac.nz wrote:
Nick Coghlan wrote:
As Chris later noted, you likely *could* still implement expression
local name binding for an except expression without a full closure, it
would just be rather difficult.
I'm still not
On Sat, Feb 22, 2014 at 8:58 PM, Antoine Pitrou solip...@pitrou.net wrote:
On Sat, 22 Feb 2014 20:29:27 +1100
Chris Angelico ros...@gmail.com wrote:
Which means that, fundamentally, EAFP is the way to do it. So if PEP
463 expressions had existed from the beginning, hasattr() probably
1 - 100 of 992 matches
Mail list logo