[Python-ideas] Re: PEP8 mandatory-is rule

2021-08-31 Thread Calvin Spealman
ion - should PEP8 push regular, > not-Python-implementation code to use is for singletons in cases where > == works perfectly? Seeing how effortless it is for programmers to use > == as their first choice, I think PEP8 should allow that practice. > > Best, > > Nick > __

[Python-ideas] Re: slices syntactic sugar

2021-08-12 Thread Calvin Spealman
__ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/pyth

[Python-ideas] Re: Namespaces!

2021-05-03 Thread Calvin Spealman
> Cheers everyone :) > ___ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived

[Python-ideas] Re: Accepting a function argument of a particular type specified by the user

2021-04-26 Thread Calvin Spealman
SE7RQ5EL2EFLYY6LTZRY5FARKN2XZW4/ > Code of Conduct: http://python.org/psf/codeofconduct/ > > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER calvin.speal...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted&

[Python-ideas] Re: Add venv activate command to the venv modules

2021-01-04 Thread Calvin Spealman
@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/SRHBSWZEUGLZG55DGRHQZ4X7VOEPY6XC/ > Code of Conduct:

[Python-ideas] Re: Getting rid of FOR loops and simplifying cicular conviolutions with Circular Indexing

2020-11-25 Thread Calvin Spealman
mensional DFT reduces > n-dimensional circular convolution to element-wise multiplication. > > ___ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/ma

[Python-ideas] Re: f-strings as assignment targets

2020-09-17 Thread Calvin Spealman
thing that the > f-string could produce as an expression, then we'd still raise a > ValueError: > > >>> f"{x:.02f}" = "0.12345" > Traceback (most recent call last): > File "", line 1, in > f"{x:.02f}"

[Python-ideas] Re: Type Implications in Python 4 (or 3.9)

2020-08-26 Thread Calvin Spealman
n-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/ZGTZNKOSTNTEA3NLJWERIGC3IHG7WU5B/ > Code of Conduct: http://python.org/psf/codeofconduct/ > > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.510

[Python-ideas] Re: Bringing the print statement back

2020-06-11 Thread Calvin Spealman
today, EOL be damned. What message do we send if we undo one of the most visible changes *now*? We'd send a message that it was all a mistake, and because of the visibility of such a quintessential line of Python print "Hello, World!" It wouldn't just send a message that this

[Python-ideas] Re: zip should return partial results in StopIteration

2020-04-21 Thread Calvin Spealman
Conduct: http://python.org/psf/codeofconduct/ > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> ___ Python-

[Python-ideas] Re: Keyword arguments self-assignment

2020-04-16 Thread Calvin Spealman
rg > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/VCCQ6BOVEQZ4ZWLKVDTVUCMAWD2VQL7B/ > Code of Conduct: http://python.org/psf/codeofconduct/ > > -- CALVIN SPEALMAN SE

[Python-ideas] Re: Traits

2020-02-07 Thread Calvin Spealman
ython.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/KFTJ6QRCTICL4NDUURNY35D7JIDM3VWY/ > Code of Conduct: http:/

[Python-ideas] Re: addition of "nameof" operator

2020-01-21 Thread Calvin Spealman
tps://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/UUFFAI3FZMQRVPDCUPZEOAZCRNXKWFDE/ > Code of Conduct: http://python.org/psf/codeofconduct/ > > -- CALVIN SPEAL

[Python-ideas] Re: [new idea] dynamic return with using function argument

2019-08-26 Thread Calvin Spealman
/ >> Code of Conduct: http://python.org/psf/codeofconduct/ >> > > > -- > --Guido van Rossum (python.org/~guido) > *Pronouns: he/him/his **(why is my pronoun here?)* > <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>

[Python-ideas] Re: PEP: add a `no` keyword as an alias for `not`

2019-08-01 Thread Calvin Spealman
``` > opposite = not regular > ``` > > 2. as a sort of ".is_falsy()" checker; when used with an if statement. > > like the first example. > > > This PEP would make the difference between the two usecases explicit. > > Thoughts? > > Best Intentions, >

[Python-ideas] Re: Namespace context managers

2019-07-26 Thread Calvin Spealman
YKJUGZKWSVZVAOGBPLZVKQG/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> __

Re: [Python-ideas] Add output() helper function to subprocess module

2019-04-05 Thread Calvin Spealman
without RETURN. >> _______ >> Python-ideas mailing list >> Python-ideas@python.org >> https://mail.python.org/mailman/listinfo/python-ideas >> Code of Conduct: http://python.org/psf/codeofconduct/ >> > -- > --Guido (mob

Re: [Python-ideas] PEP-582 and multiple Python versions

2019-04-02 Thread Calvin Spealman
2 subscribe to python-ideas and they have not brought it forward for > discussion yet, so there's no guarantee of a response. > > On Mon, Apr 1, 2019 at 5:27 AM Calvin Spealman > wrote: > >> While the PEP does show the version number as part of the path to the >> ac

[Python-ideas] PEP-582 and multiple Python versions

2019-04-01 Thread Calvin Spealman
nything like that already exists to uniquely identify a Python build or installation. -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> ___

Re: [Python-ideas] Left arrow and right arrow operators

2019-03-04 Thread Calvin Spealman
27;:2 } > >>> d3 = d1 <- d2 > >>> d3 > {'a':2, 'b':1 } > > Or on bools as Modus Ponens [1] > > Or your idea/imagination here :-) > > > > Regards, > --francis > > [1] https://en.wikipedia.org/wiki/Modus_ponens >

Re: [Python-ideas] Potential PEP: with/except

2019-01-22 Thread Calvin Spealman
trongly against to unnecessary syntactical additions to the language. > This though, I think I can except. It introduces no new concepts and > requires no special knowledge to use. There's no question about what > is going on when you read it. > > -- > Paul Ferrell > pfl...@gmail.com > __

Re: [Python-ideas] Backtick expression: similar to a shorter lambda syntax

2019-01-21 Thread Calvin Spealman
erently discourages or makes that impossible! I can't say if I'm -0 or +0 but it is one of those. > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Condu

Re: [Python-ideas] Serialization of CSV vs. JSON

2018-11-02 Thread Calvin Spealman
First, this list is not appropriate. You should ask such a question in python-list. Second, JSON is a specific serialization format that explicitly rejects datetime objects in *all* the languages with JSON libraries. You can only use date objects in JSON if you control or understand both serializa

Re: [Python-ideas] Allow Context Managers to Support Suspended Execution

2018-11-01 Thread Calvin Spealman
I'm very curious about the idea, but can't come up with any use cases based just one your explanation. Maybe you could give some examples where this would be useful? In particular, what are some cases that are really hard to handle now and how would those cases be improved like this? On Wed, Oct 3

Re: [Python-ideas] Return for assignment blocks

2018-10-25 Thread Calvin Spealman
On Thu, Oct 25, 2018 at 9:28 AM Anders Hovmöller wrote: > > > The point is not saving a line or typing, but saving a thought. > Expressing the intent of the factory function more clearly. > > Could you give some other usage examples? > > To me it seems like a nicer and less confusing way to creat

Re: [Python-ideas] Return for assignment blocks

2018-10-25 Thread Calvin Spealman
On Wed, Oct 24, 2018 at 4:41 PM Steven D'Aprano wrote: > On Wed, Oct 24, 2018 at 09:18:14AM -0400, Calvin Spealman wrote: > > I'd like to suggest what I think would be a simple addition to `def` and > > `class` blocks. I don't know if calling those "Assignment

Re: [Python-ideas] Return for assignment blocks

2018-10-24 Thread Calvin Spealman
elp? > > If my assumption above is correct this just looks like a bit of syntactic > sugar that IMO isn't really neccessary. It doesn't really improve > readability or save many characters. The existing way to do this is totally > fine. > > Benedikt > > Am 24.10.201

[Python-ideas] Return for assignment blocks

2018-10-24 Thread Calvin Spealman
I'd like to suggest what I think would be a simple addition to `def` and `class` blocks. I don't know if calling those "Assignment Blocks" is accurate, but I just mean to refer to block syntaxes that assign to a name. Anyway, I propose a combined return-def structure, and optionally also allowing a

Re: [Python-ideas] Add .= as a method return value assignment operator

2018-09-27 Thread Calvin Spealman
Absolutely -1 on this. Consider the following example: def encode(s, *args): """Force UTF 8 no matter what!""" return s.encode('utf8') text = "Hello, there!" text .= encode('latin1') Do you see how this creates an ambiguous situation? Implicit attribute lookup like this is really confusi

Re: [Python-ideas] Retire or reword the namesake of the Language

2018-09-17 Thread Calvin Spealman
I am very disappointed in the existence of this thread. Mocking discourse is extremely unpythonic. On Mon, Sep 17, 2018 at 2:54 AM Jacco van Dorp wrote: > Yeah, sounds about as sensible as the recent "ban ugly" campaign. > +1. > > Op zo 16 sep. 2018 om 15:49 schreef Wes Turner : > >> Anyways, sp

Re: [Python-ideas] Retire or reword the "Beautiful is better than ugly" Zen clause

2018-09-13 Thread Calvin Spealman
Samantha, I came into this thread reading the subject and thinking "over my dead body!" until I read your well-thought reasoning and gave even a little bit of thought to the idea. You're absolutely right and while I think its very unlikely to get enough support I do think it is a very good sugges

Re: [Python-ideas] Keyword only argument on function call

2018-09-06 Thread Calvin Spealman
On Thu, Sep 6, 2018 at 9:11 AM Steven D'Aprano wrote: > On Thu, Sep 06, 2018 at 12:15:46PM +0200, Anders Hovmöller wrote: > > > I have a working implementation for a new syntax which would make > > using keyword arguments a lot nicer. Wouldn't it be awesome if instead > > of: > > > > foo(a=

Re: [Python-ideas] Revisiting str.rreplace()

2018-07-19 Thread Calvin Spealman
If its treated as a missing parameter, and currently doesn't do anything, then it wouldn't be used... right? and it could be safe to add behavior for it... right? On Thu, Jul 19, 2018 at 11:17 AM, Eric V. Smith wrote: > On 7/19/2018 10:01 AM, Calvin Spealman wrote: > >

Re: [Python-ideas] PEP 505: None-aware operators: operators ?= and ?? and OR

2018-07-19 Thread Calvin Spealman
gt; > a = b ifnone c > > Although the assignment version looks unusual: > > b ifnone= c > > Then with the "default b = c" would look like this: > > ifnone b = c > > Le jeu. 19 juil. 2018 à 15:30, Calvin Spealman a > écrit : > >> Operators that onl

Re: [Python-ideas] Revisiting str.rreplace()

2018-07-19 Thread Calvin Spealman
It would be consistent to apply it to other functions and I'd be in favour of that, yes. On Thu, Jul 19, 2018 at 10:06 AM, Eric Fahlgren wrote: > On Thu, Jul 19, 2018 at 7:01 AM Calvin Spealman > wrote: > >> As an alternative suggestion: What if the count parameter to >

Re: [Python-ideas] Revisiting str.rreplace()

2018-07-19 Thread Calvin Spealman
As an alternative suggestion: What if the count parameter to str.replace() counted from the right with negative values? That would be consistent with other things like indexing and slicing. On Thu, Jul 19, 2018 at 9:47 AM, Eric Fahlgren wrote: > On Wed, Jul 18, 2018 at 8:20 PM Graham Gott com>

Re: [Python-ideas] PEP 505: None-aware operators: operators ?= and ?? and OR

2018-07-19 Thread Calvin Spealman
Operators that only vary by case would be... confusing. I'm not super keen on the other syntax (either the ?? or .? operators) but I do think they read well in C# where they come from. Different things work in different languages, some times. What about a new keyword: default So you'd write the a