I don't think it's possible to make this work reliably. In particular, it's
an important feature of python that you can make wrappers that pass through
arguments and are equivalent to the original function:
def original(a=0):
...
def wrapper(*args, **kwargs):
return original(*args, **kwar
On Mon, Apr 8, 2019, 02:09 Steven D'Aprano wrote:
> On Sun, Apr 07, 2019 at 08:26:24PM -0700, Nathaniel Smith wrote:
> > On Sun, Apr 7, 2019 at 7:37 PM Steven D'Aprano
> wrote:
> > > There are quite a few important algorithms which require lists to be
> &
On Sun, Apr 7, 2019 at 7:37 PM Steven D'Aprano wrote:
> There are quite a few important algorithms which require lists to be
> sorted. For example, the bisect module, and for statistics median and
> other quantiles.
But this flag doesn't affect those modules, right? 'bisect' already
requires the
On Thu, Apr 4, 2019 at 1:59 AM Greg Ewing wrote:
>
> Nathaniel Smith wrote:
> > On Thu, Apr 4, 2019 at 12:48 AM Greg Ewing
> > wrote:
> >>output(args) --> (status, output)
> >
> > Isn't this already available as: run(args, stdout=PIPE)?
>
&
On Thu, Apr 4, 2019 at 12:48 AM Greg Ewing wrote:
>
> The check_output() function of the subprocess module raises an
> exception if the process returns a non-zero exit status. This is
> inconvenient for commands such as grep that use the return
> status to indicate something other than success or
On Sun, Mar 31, 2019 at 9:17 PM Nam Nguyen wrote:
> Installing a package out of stdlib does not solve the problem that motivated
> this thread. The libraries included in the stdlib can't use those parsers.
Can you be more specific about exactly which code in the stdlib you
think should be rewrit
On Thu, Mar 28, 2019 at 4:52 PM Steven D'Aprano wrote:
> On Thu, Mar 28, 2019 at 03:25:34PM -, Richard Whitehead wrote:
> > Chris,
> >
> > As a new member to this list, I can tell you that searching for relevant old
> > content was effectively impossible, so I'm all for some way of doing that.
On Tue, Mar 26, 2019, 09:50 Richard Whitehead
wrote:
> Nathaniel,
>
> Thanks very much for taking the time to comment.
>
> Clearing the event after waiting for it will introduce a race condition:
> if
> the sender has gone around its loop again and set the semaphore after we
> have woken but befo
These kinds of low-level synchronization primitives are notoriously
tricky, yeah, and I'm all in favor of having better higher-level
tools. But I'm not sure that AutoResetEvent adds enough to be worth
it.
AFAICT, you can get this behavior with an Event just fine – using your
pseudocode:
def sende
On Wed, Mar 6, 2019 at 12:13 PM Matěj Cepl wrote:
>
> Hi,
>
> I am a lead maintainer of Python packages in OpenSUSE and I can
> see the pattern of many packagers adding blindly
>
> python setup.py test
>
> to %check section of our SPEC file. The problem is that if the
> package doesn't use uni
On Wed, Mar 6, 2019 at 4:37 PM pylang wrote:
>> def maybe_async(fn):
>> @functools.wraps(fn)
>> def wrapper(*args, **kwargs):
>> coro = fn(*args, **kwargs)
>> if asyncio.get_running_loop() is not None:
>> return coro
>> else:
>> return await
Defining a single polymorphic function is easy at the library level.
For example, with asyncio:
def maybe_async(fn):
@functools.wraps(fn)
def wrapper(*args, **kwargs):
coro = fn(*args, **kwargs)
if asyncio.get_running_loop() is not None:
return coro
On Mon, Mar 4, 2019 at 11:41 PM INADA Naoki wrote:
> Then, I propose `dict.merge` method. It is outer-place version
> of `dict.update`, but accepts multiple dicts. (dict.update()
> can be updated to accept multiple dicts, but it's not out of scope).
>
> * d = d1.merge(d2) # d = d1.copy(); d.upd
The first concern that comes to my mind is... When I see:
with:
...
except:
...
Is that a shorthand for
try:
with:
...
except:
...
or for
with:
try:
...
except:
...
? Both are plausible, and it makes a big difference, because 'with' already
has
On Sun, Jan 6, 2019 at 11:06 PM Steven D'Aprano wrote:
> I'm not wedded to the idea that the default ought to be the current
> behaviour. If there is a strong argument for one of the others, I'm
> listening.
"Errors should never pass silently"? Silently returning nonsensical
results is hard to de
On Sat, Jan 5, 2019 at 9:13 PM Moon丶sun wrote:
>
> Thanks for your reply.
> But the answer is not I except, I will show you some examples to explain what
> result I except:
>
> @contextmanager
> def cm():
> print('open file')
> yield
> print('close file')
> with cm():
> 1/0
>
> If
On Wed, Dec 26, 2018, 02:19 Andrew Svetlov
> Also I'm thinking about type annotations in typeshed.
> Now the type is Union[array[int], bytes, bytearray, memoryview]
> Should it be Union[io.BinaryIO, array[int], bytes, bytearray, memoryview] ?
>
Yeah, trying to support both buffers and file-like o
If you want this style of concurrency, you don't need to write a PEP,
just 'pip install gevent' :-)
But unfortunately you're years too late to argue for making asyncio
work this way. This was discussed extensively at the time, and the
decision to use special syntax was made intentionally, and afte
On Fri, Dec 7, 2018 at 3:38 PM Steven D'Aprano wrote:
> On Fri, Dec 07, 2018 at 01:25:19PM -0800, Nathaniel Smith wrote:
>
> > For this specific purpose, md5 is just as good as a proper hash. But all
> > else being equal, it would still be better to use a proper hash, j
For this specific purpose, md5 is just as good as a proper hash. But all
else being equal, it would still be better to use a proper hash, just so
people don't have to go through the whole security analysis to check that.
Of course all else isn't equal: switching from md5 to sha-whatever would
requ
On Mon, Nov 19, 2018 at 6:09 PM Steven D'Aprano wrote:
>
> On Mon, Nov 19, 2018 at 05:09:25PM -0800, danish bluecheese wrote:
> > I think it is kind of useless effort. If somebody using range() then
> > probably knows about it.
>
> For experienced users, sure, but this is an enhancement to help
>
On Fri, Nov 9, 2018 at 4:32 PM, danish bluecheese
wrote:
> you are right on the lines you mentioned. Those are all working if i run it
> as a module which i do every time.
> This is somewhat unpleasant to me, especially while developing something and
> trying to test it quickly.
> I just want to b
The WSGI PEP is a bit of a funny thing, since it's a PEP that doesn't
really involve the language or stdlib. (I guess there's wsgiref, but I
don't think it being in the stdlib actually affects much these days.)
What are you hoping to accomplish by making ASGI a PEP?
-n
On Sat, Oct 27, 2018 at 4:
On Thu, Oct 25, 2018, 14:44 Marko Ristin-Kaufmann
wrote:
>
> Nathaniel Smith wrote:
>
>> In your position, I wouldn't be talking to the core devs; I'd be
>> writing blog posts to proselytize the advantages of contracts, working
>> with popular projects
On Wed, Oct 24, 2018 at 11:23 AM, Marko Ristin-Kaufmann
wrote:
> I imagine that you conceive contracts purely as an approach to a testing to
> be applied to a single project. I'm not talking about that. I'm talking
> about two packages on pypi, both specifying contracts, each developed by a
> sepa
On Sun, Oct 21, 2018 at 8:31 PM, Guido van Rossum wrote:
> On Sun, Oct 21, 2018 at 6:08 PM Nathaniel Smith wrote:
>> I'm not sure if this is an issue the way Queue is used in practice, but in
>> general you have to be careful with this kind of circular flow because if
>&g
On Sun, Oct 21, 2018, 16:48 MRAB wrote:
> On 2018-10-21 22:30, Antoine Pitrou wrote:
> > On Sun, 21 Oct 2018 19:58:05 +0200
> > Vladimir Filipović
> > wrote:
> >>
> >> To anticipate a couple more possible questions:
> >>
> >> - What would this proposal do about multiple producers/consumers
> >>
Hi Vladimir,
It's great to see people revisiting these old stdlib tools. Closure
tracking is definitely a big point of awkwardness for Queues. In Trio we
started with a straight copy of threading.Queue, and this turned out to be
a major friction point for users. We just deprecated our version of Q
On Mon, Oct 8, 2018 at 2:55 AM, Steven D'Aprano wrote:
>
> On Mon, Oct 08, 2018 at 09:10:40AM +0200, Jimmy Girardet wrote:
>> Each tool which wants to use pyproject.toml has to add a toml lib as a
>> conditional or hard dependency.
>>
>> Since toml is now the standard configuration file format,
>
On Sun, Oct 7, 2018 at 5:54 PM, Nathaniel Smith wrote:
> Are you imagining something roughly like this? (Ignoring chunk
> boundary handling for the moment.)
>
> def find_double_line_end(buf):
> start = 0
> while True:
> next_idx = buf.index(b"\n", s
On Sun, Oct 7, 2018 at 5:09 PM, Terry Reedy wrote:
> On 10/6/2018 5:00 PM, Nathaniel Smith wrote:
>>
>> On Sat, Oct 6, 2018 at 12:22 AM, Ram Rachum wrote:
>>>
>>> I'd like to use the re module to parse a long text file, 1GB in size. I
>>> wish
&g
On Sat, Oct 6, 2018, 18:40 Steven D'Aprano wrote:
> The message I take from this is:
>
> - regex engines certainly can be written to support streaming data;
> - but few of them are;
> - and it is exceedingly unlikely to be able to easily (or at all)
> retro-fit that support to Python's existing
On Sat, Oct 6, 2018 at 2:04 PM, Chris Angelico wrote:
> On Sun, Oct 7, 2018 at 8:01 AM Nathaniel Smith wrote:
>>
>> On Sat, Oct 6, 2018 at 12:22 AM, Ram Rachum wrote:
>> > I'd like to use the re module to parse a long text file, 1GB in size. I
>> > wish
On Sat, Oct 6, 2018 at 12:22 AM, Ram Rachum wrote:
> I'd like to use the re module to parse a long text file, 1GB in size. I wish
> that the re module could parse a stream, so I wouldn't have to load the
> whole thing into memory. I'd like to iterate over matches from the stream
> without keeping
On Wed, Oct 3, 2018 at 10:48 AM, Chris Angelico wrote:
> On Thu, Oct 4, 2018 at 2:30 AM Anders Hovmöller wrote:
>>
>> Nothing is a keyword in that example or in my example. My suggestion is that
>> we could do:
>>
>> my_func(=big_array[5:20])
>>
>> And it would be compile time transformed into
>
On Wed, Oct 3, 2018, 03:55 Eric V. Smith wrote:
>
> On 10/3/2018 1:40 AM, Nathaniel Smith wrote:
> > I think the way I'd do it would be:
> >
> > Step 1: Take the current "lnotab" that lets us map bytecode offsets ->
> > line numbers, and exte
On Tue, Oct 2, 2018 at 8:44 PM, David Teresi wrote:
> print(f'{value!d}') is a lot of symbols and boilerplate to type out just
for
> a debugging statement that will be deleted later. Especially now that
> breakpoint() exists, I can't really see myself using this.
>
> I also don't see the use case
On Fri, Sep 28, 2018 at 11:31 PM, Steve Barnes wrote:
> One specific use case that springs to mind would be for Libraries such
> as Pandas to return iNaN for entries that are not numbers in a column
> that it has been told to treat as integers.
Pandas doesn't use Python objects to store integers,
On Thu, Sep 13, 2018 at 9:13 AM, Mark E. Haase wrote:
> On Thu, Sep 13, 2018 at 10:49 AM Rhodri James wrote:
>
>> More importantly, this whole idea of banning and/or changing terminology
>> is psychologically and sociologically wrong-headed. The moment you say "You
>> may not use that word" you
On Mon, Aug 20, 2018 at 12:34 AM, Simon De Greve wrote:
> Do you mean that for loops inside an "async def" statements are always
> executed as 'async for' loops? That's what I wanted to acheive by writing
> the AsyncDict class (c.f. the CodeReview link).
The only difference between an 'async for'
On Mon, Aug 20, 2018 at 12:19 AM, Simon De Greve wrote:
> Hello everyone,
>
> I'm quite new working with asyncio and thus maybe missing some things about
> it, but wouldn't it be quite easier to have some iterables to support async
> for loops "natively", since asyncio is now part of the Stdlib?
>
On Tue, Aug 7, 2018 at 11:14 PM, Ken Hilton wrote:
> This mostly springs off of a comment I saw in some thread.
>
> The point of a with statement is that it ensures that some resource will be
> disposed of, yes? For example, this:
>
> with open(filename) as f:
> contents = f.read()
>
>
On Thu, Jul 19, 2018 at 5:45 PM, Al Sweigart wrote:
> The goal of this idea is to make it easier to find out when someone has
> installed packages for the wrong python installation. I'm coming across
> quite a few StackOverflow posts and emails where beginners are using pip to
> install a package,
On Wed, Jul 18, 2018 at 11:49 AM, Stephan Houben wrote:
> Basically, what I am suggesting is a direct translation of Javascript's
> Web Worker API
> (https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)
> to Python.
>
> The Web Worker API is generally considered a "share-nothing" appr
On Sun, Jul 15, 2018 at 6:00 PM, Chris Angelico wrote:
> On Mon, Jul 16, 2018 at 10:31 AM, Nathaniel Smith wrote:
>> On Sun, Jul 8, 2018 at 11:27 AM, David Foster wrote:
>>> * The Actor model can be used with some effort via the “multiprocessing”
>>> module, but it do
On Sun, Jul 8, 2018 at 11:27 AM, David Foster wrote:
> * The Actor model can be used with some effort via the “multiprocessing”
> module, but it doesn’t seem that streamlined and forces there to be a
> separate OS process per line of execution, which is relatively expensive.
What do you mean by "
On Thu, Jul 5, 2018 at 1:25 PM, Flavio Curella wrote:
>
>> What functionality does such a thing actually need?
>
> I think the requirements should be:
> * The resulting symbol behave exactly like None. IE: the symbol should not
> be an instance of object, but an instance of its own class
> * A sym
On Thu, Jun 28, 2018 at 2:25 PM, Andrei Kucharavy
wrote:
>> This is indeed a serious problem. I suspect python-ideas isn't the
>> best venue for addressing it though – there's nothing here that needs
>> changes to the Python interpreter itself (I think), and the people who
>> understand this probl
On Wed, Jun 27, 2018 at 2:20 PM, Andrei Kucharavy
wrote:
> To remediate to that situation, I suggest a __citation__ method associated
> to each package installation and import. Called from the __main__,
> __citation__() would scan __citation__ of all imported packages and return
> the list of all
On Sat, Jun 23, 2018 at 5:58 PM, Greg Ewing wrote:
> j...@math.brown.edu wrote:
>>
>> it would be nice if we could write an async version of this, as in ``async
>> for chunk in aiter(...)``.
>
> The time machine seems to have taken care of this:
>
> https://docs.python.org/3.6/reference/compound_s
On Fri, Jun 22, 2018 at 6:45 PM, Steven D'Aprano wrote:
> On Sat, Jun 23, 2018 at 01:33:59PM +1200, Greg Ewing wrote:
>> Chris Angelico wrote:
>> >Downside:
>> >You can't say "I'm done with this string, destroy it immediately".
>>
>> Also it would be hard to be sure there wasn't another
>> copy of
You might find this useful, either to use directly or as a source of
inspiration:
https://github.com/ll/cloudpickle-generators
-n
On Tue, Jun 19, 2018, 15:55 Micheál Keane wrote:
>
> Add a function to generator objects to copy the entire state of it:
>
> Proposed example code:
>
> game
On Fri, Jun 15, 2018 at 3:56 PM, Andre Roberge wrote:
> * people doing heavy numerical work and wanting code as readable as possible
IME serious numerical work doesn't use approximate equality tests at
all, except in test assertions.
> * teaching mostly beginners about finite precision for float
On Tue, Jun 12, 2018, 00:03 Stephan Houben wrote:
> Hi all,
>
> I wrote a possible implementation of sindg:
>
> https://gist.github.com/stephanh42/336d54a53b31104b97e46156c7deacdd
>
> This code first reduces the angle to the [0,90] interval.
> After doing so, it can be observed that the simple im
Twisted's reactor API has some lifecycle hooks:
https://twistedmatrix.com/documents/18.4.0/api/twisted.internet.interfaces.IReactorCore.html#addSystemEventTrigger
My impression is that this is actually pretty awkward for twisted/asyncio
interoperability, because if you're trying to use a twisted
On Fri, May 18, 2018 at 1:53 PM, Noah Simon wrote:
> Hello all,
> I was developing a script using an asyncio-based API, when I came across the
> need to define an asynchronous lambda. I found this syntax does not
> currently exist. Obviously I could have (and did) just write a regular
> coroutine,
On Thu, May 17, 2018 at 9:49 AM, Chris Barker via Python-ideas
wrote:
> On Tue, May 15, 2018 at 11:21 AM, Rob Speer wrote:
>>
>>
>> I'm sure that the issue of "what do you call the leap second itself" is
>> not the problem that Chris Barker is referring to. The problem with leap
>> seconds is tha
On Sun, May 13, 2018 at 9:00 PM, Greg Ewing wrote:
> Guido van Rossum wrote:
>>
>> Of course this would still not help for names of functions that might be
>> imported directly (do people write 'from numpy import where'?).
>
>
> Maybe things could be rigged so that if you use a reserved word
> as
You don't mention the option of allowing time.microseconds to be a
float, and I was curious about that since if it did work, then that
might be a relatively smooth extension of the current API. The highest
value you'd store in the microseconds field is 1e6, and at values
around 1e6, double-precisio
There are hidden directories, and then there are hidden directories :-). It
makes sense to me to add an option to the stdlib functions to skip
directories (and files) that the system considers hidden, so I guess that
means dotfiles on Unix and files with the hidden attribute on Windows. But
if you
On Mon, May 7, 2018, 03:45 Steven D'Aprano wrote:
> On Sun, May 06, 2018 at 09:33:03PM -0700, Nathaniel Smith wrote:
>
> > How is
> >
> > data_path = __filepath__.parent / "foo.txt"
> >
> > more distracting than
> >
> > data_
On Sun, May 6, 2018 at 8:47 PM, Nick Coghlan wrote:
> On 7 May 2018 at 13:33, Nathaniel Smith wrote:
>>
>> Spit-balling: how about __filepath__ as a
>> lazily-created-on-first-access pathlib.Path(__file__)?
>>
>> Promoting os.path stuff to builtins just as pathli
Spit-balling: how about __filepath__ as a
lazily-created-on-first-access pathlib.Path(__file__)?
Promoting os.path stuff to builtins just as pathlib is emerging as
TOOWTDI makes me a bit uncomfortable.
On Sun, May 6, 2018 at 8:29 PM, Nick Coghlan wrote:
> On 7 May 2018 at 12:35, Chris Angelico
On Fri, May 4, 2018 at 6:56 PM, Alexander Belopolsky
wrote:
> On Fri, May 4, 2018 at 8:06 AM, Nick Coghlan wrote:
>> ...
>> With that spelling, the three examples above would become:
>>
>> # Exactly one branch is executed here
>> if m given m = pattern.search(data):
>> ...
>>
On Fri, May 4, 2018 at 2:58 PM, Guido van Rossum wrote:
> First, "start executing immediately" is an overstatement, right? They won't
> run until the caller executes a (possibly unrelated) `await`.
Well, traditional Future-returning functions often do execute some
logic immediately, but right, wh
Hi all,
This is a bit of a wacky idea, but I think it might be doable and have
significant benefits, so throwing it out there to see what people
think.
In asyncio, there are currently three kinds of calling conventions for
asynchronous functions:
1) Ones which return a Future
2) Ones which retur
On Fri, May 4, 2018 at 1:53 PM, Tim Peters wrote:
> [Tim]
>>> ...
>>> It's no longer the case that Python avoided that entirely, since
>>> "async def", "async for", and "async with" statements were added
>>> _without_ making "async" a new reserved word. It may require pain in
>>> the parser, but
On Tue, May 1, 2018, 02:55 Matt Arcidy wrote:
>
> I am not inferring causality when creating a measure.
No, but when you assume that you can use that measure to *make* code more
readable, then you're assuming causality.
Measuring the
> temperature of a steak doesn't infer why people like it me
On Mon, Apr 30, 2018 at 8:46 PM, Matt Arcidy wrote:
> On Mon, Apr 30, 2018 at 5:42 PM, Steven D'Aprano wrote:
>> (If we know that, let's say, really_long_descriptive_identifier_names
>> hurt readability, how does that help us judge whether adding a new kind
>> of expression will hurt or help read
On Sat, Apr 28, 2018 at 7:29 PM, Greg Ewing wrote:
> but he sent it in HTML using a proportional font, which spoils the effect!
Uh...? https://vorpus.org/~njs/tmp/monospace.png
It looks like my client used "font-family: monospace", maybe yours
only understands or something? Anyway, if anyone el
On Fri, Apr 27, 2018 at 5:58 AM, Chris Angelico wrote:
> On Fri, Apr 27, 2018 at 9:27 PM, Steven D'Aprano
wrote:
> I don't think this needs any specific compiler magic or making 'dp' a
> reserved name, but it might well be a lot easier to write if there
> were some compiler features provided to _
Hi all,
This came up in passing in one of the PEP 572 threads, and I'm curious
if folks think it's a good idea or not. When debugging, sometimes you
have a somewhat complicated expression that's not working:
# Hmm, is func2() returning the right thing?
while (func1() + 2 * func2()) < func3():
On Mon, Apr 16, 2018 at 11:21 PM, Derek Maciel wrote:
> The modules http.client and http.server both do a wonderful job when
> implementing HTTP clients and servers, respectively. However, occasionally
> there may be a need to create and parse HTTP messages themselves without
> needing to implemen
On Tue, Mar 20, 2018 at 1:03 AM, Wes Turner wrote:
> I added trio to the comparison table
> (Things are mostly just async-wrapped,
> though pathlib_not_trio does show a few missing methods?).
trio.Path is an automatically generated, exact mirror of pathlib.Path,
so I don't think it's very useful
On Sun, Mar 18, 2018 at 4:58 AM, George Fischhof wrote:
> Of course several details could be put into it, but I think it would better
> to let the developers decide the details, because they know the environment
> and the possibilities.
That's not how PEPs work :-). Someone has to do the work of
On Sat, Mar 17, 2018 at 10:15 AM, Stephen J. Turnbull
wrote:
> (5) perform operations on several objects denoted by Paths at once
> (copy and its multiple operand variants),
Sure it does: Path.rename and Path.replace. I know why rename and copy
have historically been in separate modules, but
On Fri, Mar 16, 2018 at 11:19 PM, Stephen J. Turnbull
wrote:
> PLIQUE Guillaume writes:
>
> > That's really interesting. I did not know there were so many way to
> > consider quantiles. Maybe we should indeed wait for numpy to take a
> > decision on the matter and go with their default choice s
On Thu, Mar 15, 2018 at 12:39 PM, PLIQUE Guillaume
wrote:
> Hello everyone,
>
> Sorry if this subject has already been covered in the mailing list but I
> could not find it.
>
> My question is very simple: should the `quantile` function be added to
> python `statistics` module.
This seems like a
On Mar 12, 2018 1:57 PM, "George Fischhof" wrote:
This PEP proposes pathlib module to be a centralized place for all
file-system related operations.
I'd find this useful for another reason that hasn't been mentioned yet:
having a single class collecting all the common/basic file operations make
On Sat, Mar 10, 2018 at 2:45 PM, Chris Barker wrote:
> On Sat, Mar 10, 2018 at 3:24 AM, MRAB wrote:
>>
>> On 2018-03-10 01:15, Guido van Rossum wrote:
>>>
>>> Yes, you can use the |= operator instead.
>>>
>> |= is not quite the same as .update because it rebinds,
>
>
> isn't that an "in-place ope
On Sat, Mar 3, 2018 at 9:12 AM, Jamesie Pic wrote:
>
> Hello everybody,
>
> I thought perhaps we could allow the usage of a "new" keyword to instanciate
> an object, ie:
>
>obj = new yourmodule.YourClass()
>
> In this case, it would behave the same as from yourmodule import YourClass;
> obj =
On Feb 7, 2018 1:54 PM, "Neil Girdhar" wrote:
Decimal could just pull its Context object from a context variable rather
than having to pass it in to all functions. This would be similar to how
numpy works.
Decimal has always used a thread local context the same way numpy does, and
in 3.7 it's
On Sun, Jan 28, 2018 at 5:31 PM, David Mertz wrote:
> I actually didn't know about `locale.format("%d", 10e9, grouping=True)`.
> But it's still much less general than having the option in the
> f-string/.format() mini-language. This is really about the formatted
> string, not necessarily about th
On Sun, Jan 28, 2018 at 5:46 AM, Eric V. Smith wrote:
> If I recall correctly, we discussed this at the time, and the problem with
> locale is that it's not thread safe. I agree that if it were, it would be
> nice to be able to use it, either with 'n', or in some other mode just for
> grouping.
>
On Thu, Jan 18, 2018 at 7:51 PM, Guido van Rossum wrote:
> Can someone explain to me why this is such a controversial issue?
I guess practicality versus purity is always controversial :-)
> It seems reasonable to me to add new encodings to the stdlib that do the
> roundtripping requested in the
On Wed, Jan 17, 2018 at 10:13 AM, Rob Speer wrote:
> I'm going to push back on the idea that this should only be used for
> decoding, not encoding.
>
> The use case I started with -- showing people how to fix mojibake using
> Python -- would *only* use these codecs in the encoding direction. To fi
On Jan 11, 2018 4:05 AM, "Antoine Pitrou" wrote:
Define "widely used". If web-XXX is a superset of windows-XXX, then
perhaps web-XXX is "used" in the sense of "used to decode valid
windows-XXX data" (but windows-XXX could be used just as well to
decode the same data). The question is rather: ho
On Jan 9, 2018 04:12, "Random832" wrote:
On Tue, Jan 9, 2018, at 05:46, Nick Coghlan wrote:
> If you view them as comparable to subprocess pipes, then it can be
> surprising that they're not iterable when using a line-oriented
> protocol.
>
> If you instead view them as comparable to socket conne
On Tue, Jan 9, 2018 at 2:07 AM, Antoine Pitrou wrote:
> On Mon, 8 Jan 2018 21:22:56 -0800
> Nathaniel Smith wrote:
>>
>> The only documented error from multiprocessing.Connection.recv is EOFError,
>> which is basically equivalent to a StopIteration.
>
> Actual
On Mon, Jan 8, 2018 at 7:27 PM, Amit Green wrote:
> An argument against this API, is that any caller of recv should be doing
> error handling (i.e.: catching exceptions from the socket).
>
It's still not entirely clear, but I'm pretty sure this thread is talking
about multiprocessing.Connection
On Dec 28, 2017 12:10, "Joao S. O. Bueno" wrote:
This is probably too little to justify the compatibility breakage, but is
there a motive for the "slice" type to be on built-ins ?
(besides people forgot it there at PEP-3000 time?)
It is normally used in super-specialized cases, mostly when one
On Sun, Dec 3, 2017 at 10:48 PM, Carl Meyer wrote:
> It'd be nice to be able to eliminate an import and have the lines of
> code and instead write that as:
>
> class BankAccount:
> def __init__(self, balance):
> self.balance = balance
>
> def __sort_key__(self):
>
On Mon, Nov 27, 2017 at 7:22 PM, bunslow wrote:
> My first submission to this list was predicated on what I'd read in PEPs --
> and many of those, since they recommend major-enough changes to require a
> PEP, have sections (often lengthy) dedicated to "what's wrong with the
> status quo". My attem
On Tue, Nov 14, 2017 at 12:56 AM, Paul Moore wrote:
> On 14 November 2017 at 03:08, Nathaniel Smith wrote:
>> On Nov 13, 2017 6:47 PM, "Nick Coghlan" wrote:
>
>>> and a pip.bat with the equivalent contents on Windows?
>>> (Bonus: maybe this wou
On Nov 13, 2017 6:47 PM, "Nick Coghlan" wrote:
On 14 November 2017 at 11:51, Nathaniel Smith wrote:
> What if instead of installing a standard entry point, the pip
> executable was installed as
>
> #!/bin/sh
> exec python -m pip "$@"
>
> on Unix-likes
I
On Sun, Nov 12, 2017 at 8:59 AM, Brendan Barnwell wrote:
> On 2017-11-12 05:18, Nick Coghlan wrote:
>>
>> * the `pip install` option really is nicer looking than `python -m pip
>> install`, and it only has actual problems in the presence of multiple
>> Python versions and when upgrading pip itself
On Wed, Nov 1, 2017 at 2:47 PM, Terry Reedy wrote:
> When pip installs a package into site_packages, does it at any point run
> package-specific installation code? setup.py?
Nope. That's a can of worms that we've so far avoided opening.
> More specifically, can pip
> install an IDLE extension.
On Wed, Nov 1, 2017 at 7:41 AM, Guido van Rossum wrote:
> Can you write 1-2 paragraphs with the argument for each?
>
> On Tue, Oct 31, 2017 at 10:01 PM, Nathaniel Smith wrote:
>> - lxml
My impression (probably others are more knowledgeable) is that lxml
has more or less replaced
On Oct 31, 2017 4:42 AM, "Nick Coghlan" wrote:
On 31 October 2017 at 02:29, Guido van Rossum wrote:
> What's your proposed process to arrive at the list of recommended packages?
>
I'm thinking it makes the most sense to treat inclusion in the recommended
packages list as a possible outcome of
On Mon, Oct 30, 2017 at 5:45 AM, Ivan Pozdeev via Python-ideas
wrote:
> Generally, packages are compiled for the same processor generation as the
> corresponding Python.
> But not always -- e.g. NumPy opted for SSE2 even for Py2 to work around some
> compiler bug
> (https://github.com/numpy/numpy/
1 - 100 of 191 matches
Mail list logo