On Thu, Apr 2, 2020 at 3:27 PM Steven D'Aprano wrote:
> Or maybe that's just an argument that no solution is going to solve
> *every* problem. What do we do about people who write this:
>
> buf = f'{buf}{substring}'
>
> inside a loop? We can't fix everyone's code with one change.
>
I don't
On Tue, Mar 31, 2020 at 12:39:56AM -0700, Christopher Barker wrote:
> But while the OP specifically suggested adding += to stringIO, you might
> note that he did not suggest it as an extension to the file protocol, which
> StringIO mimics. Rather, he suggested that there should be something that
On Wed, Apr 01, 2020 at 07:00:00PM -0700, Christopher Barker wrote:
> > But with all that, I don't see why such a "mutable string" would be
> > more suitable for "string builder" pattern.
>
> It would in one small way, which is that it would be usable directly in
> many (not all by any means)
On Wed, Apr 01, 2020 at 09:25:46PM -0400, Kyle Stanley wrote:
> While I agree that it's sometimes okay to go outside the strict bounds of
> "only one way to do it"
The Zen of Python was invented as a joke, not holy writ, and as a series
of koans intended to guide thought, not shut it down.
Before jumping in:
In many cases, when you want to reverse an enumerate, it’s small and
fixed-sized, so there’s a trivial way to do this: Just store the enumerate
iterator in a tuple, and tuples are reversible.
for idx, value in reversed(tuple(enumerate(stuff))):
But of course there are
On Apr 1, 2020, at 14:47, Paul Sokolovsky wrote:
>
>> At the moment, the
>> message is relatively clear - "build a list and join it" (it's very
>> rare that anyone suggests StringIO currently).
>
> I don't know how much you mix with other Pythonistas, but word "clear"
> is an exaggeration.
Hi Ilya,
I'm not sure that this mailing list (Python-Dev) is the right place for
this discussion, I think that Python-Ideas (CCed) is the correct place.
For the benefit of Python-Ideas, I have left your entire post below, to
establish context.
[Ilya]
> I needed reversed(enumerate(x: list)) in
On Wed, Apr 1, 2020 at 1:31 PM Paul Sokolovsky wrote:
>
> > In short: a mutable string would satisfy the requirements of a "string
> > builder", and more.
>
> Thanks for the detailed explanation. For me, a canonical example of a
> feature of "mutable string" would be:
>
> s = MutStr("foo")
>
On Thu, Apr 2, 2020 at 12:27 PM Kyle Stanley wrote:
> As Chris Angelico mentioned, this can be observed through monitoring the
> before and after RSS (or equivalent on platforms without it). On Linux, I
> typically use something like this:
>
> ```
> def show_rss():
> os.system(f"grep ^VmRSS
Paul Sokolovsky wrote:
> Roughly speaking, the answer would be about the same in idea as answers
> to the following questions:
> [snip]
I would say the difference between this proposal so far and the ones listed
are that they emphasized concrete, real-world examples from existing code
either in
Hello,
On Wed, 1 Apr 2020 10:01:06 +0100
Paul Moore wrote:
> On Wed, 1 Apr 2020 at 02:07, Steven D'Aprano
> wrote:
> > Paul has not suggested making StringIO look and feel like a string.
> > Nobody is going to add 45+ string methods to StringIO. This is a
> > minimal extension to the StringIO
Hello,
On Tue, 31 Mar 2020 17:01:19 -0700
Christopher Barker wrote:
[]
> So that suggested to me that a mutable string type would completely
> satisfy your use case, but be more natural to folks used to strings:
>
> message = MutableString("The start of the message")
> for i in something:
>
On Apr 1, 2020, at 11:59, Jonathan Goble wrote:
>
>> On Wed, Apr 1, 2020 at 2:35 PM Dan Sommers
>> <2qdxy4rzwzuui...@potatochowder.com> wrote:
>> On Wed, 01 Apr 2020 10:50:29 -0700
>> Brendan Barnwell wrote:
>>
>> > ... we must demand that the language itself be renamed to something
>> > less
On Wed, Apr 1, 2020 at 2:35 PM Dan Sommers <
2qdxy4rzwzuui...@potatochowder.com> wrote:
> On Wed, 01 Apr 2020 10:50:29 -0700
> Brendan Barnwell wrote:
>
> > ... we must demand that the language itself be renamed to something
> > less offensive and more accurate, such as
> >
On Wed, 01 Apr 2020 10:50:29 -0700
Brendan Barnwell wrote:
> ... we must demand that the language itself be renamed to something
> less offensive and more accurate, such as
> ConvenientProgrammingLanguage ...
ITYM convenient_programming_language. See PEP 8, Naming Conventions,
Method Names and
On 01/04/2020 19:07, MRAB wrote:
On 2020-04-01 18:20, Andrew Barnert via Python-ideas wrote:
On Mar 31, 2020, at 20:03, Greg Ewing
wrote:
On 1/04/20 7:08 am, Serhiy Storchaka wrote:
31.03.20 20:52, Antoine Pitrou пише:
Your search is incomplete, for example you failed to account for
On 2020-04-01 18:20, Andrew Barnert via Python-ideas wrote:
On Mar 31, 2020, at 20:03, Greg Ewing wrote:
On 1/04/20 7:08 am, Serhiy Storchaka wrote:
31.03.20 20:52, Antoine Pitrou пише:
Your search is incomplete, for example you failed to account for
occurrences of "cheese" and
On 2020-03-31 10:17, Gerrit Holl wrote:
(needs a sponsor)
latest version at
https://github.com/gerritholl/peps/blob/animal-friendly/pep-.rst
PEP:
Title: Retire animal-unfriendly language
Author: Gerrit Holl
Discussions-To: python-ideas@python.org
Status: Draft
Type: Informational
On Wed, 1 Apr 2020 10:20:39 -0700
Andrew Barnert via Python-ideas
wrote:
> On Mar 31, 2020, at 20:03, Greg Ewing wrote:
> >
> > On 1/04/20 7:08 am, Serhiy Storchaka wrote:
> >> 31.03.20 20:52, Antoine Pitrou пише:
> >>> Your search is incomplete, for example you failed to account for
> >>>
On Mar 31, 2020, at 20:03, Greg Ewing wrote:
>
> On 1/04/20 7:08 am, Serhiy Storchaka wrote:
>> 31.03.20 20:52, Antoine Pitrou пише:
>>> Your search is incomplete, for example you failed to account for
>>> occurrences of "cheese" and "milkshake".
>
> Should we deprecate the word "wheel" as
We've got to be considerate of other languages: What if, for example, a German
speaker is looking for example code in English documentation and sees the word
"speck"? He/she will think it means bacon and will be offended!
Sent via the Samsung Galaxy S® 6, an AT 4G LTE smartphone
Get Outlook for
On Tue, Mar 31, 2020 at 04:11:12PM -0700, Matthias Bussonnier
wrote:
> On Tue, 31 Mar 2020 at 10:18, Gerrit Holl wrote:
>
> > the command ``cat $(find . -name '*.py') | grep -oi term | wc -l`` was used.
>
> I'm quite concern in the lack of mention of proper forms and procedure
> to perform
On Wed, 1 Apr 2020 at 02:07, Steven D'Aprano wrote:
> Paul has not suggested making StringIO look and feel like a string.
> Nobody is going to add 45+ string methods to StringIO. This is a minimal
> extension to the StringIO class which will allow people to improve their
> string building code
23 matches
Mail list logo