This would break any code that uses “when” as a variable name.
https://github.com/search?l=Python&q=when&type=Code
On Sun, Dec 29, 2019 at 11:26 AM Abdur-Rahmaan Janhangeer <
[email protected]> wrote:
> Greetings list,
>
> I was wondering if adding the When keyword is a good idea.
> Normally
It doesn't look like it's popular or used much, but i spent a minute or two
looking via github search and found this library that uses @ for currying:
https://github.com/kanales/spycy/blob/master/spycy/__init__.py#L87
On Tue, Feb 11, 2020 at 11:26 AM Brandt Bucher
wrote:
> Thanks for bringing t
This github search seems to return more direct hits of this usage pattern:
https://github.com/search?l=Python&q=__matmul__+curry&type=Code
On Tue, Feb 11, 2020 at 11:38 AM Nathan wrote:
> It doesn't look like it's popular or used much, but i spent a minute or
> two looki
sn't working in your code.
So -1 on that idea even if PEP 505 were accepted.
Nathan Mugnier
> Message du 19/07/18 15:06
> De : "Pål Grønås Drange"
> A : "Jonathan Fine"
> Copie à : "Python-Ideas"
> Objet : Re: [Python-ideas] PEP 505: None
operations more easily accessible and prevent patterns from being
mixed up with string data.
A potential downside, though, is that it will be tempting to introduce
flags as prefixes, too. Do we want to go down the road of pui"my
Unicode-compatibl
On Thu, Mar 21, 2019 at 9:17 AM Serhiy Storchaka
wrote:
> 21.03.19 14:51, Chris Angelico пише:
> > ... then, in the interests of productive discussion, could you please
> > explain? What is it about dict addition that makes it harder to
> > understand than other addition?
>
> Currently the + oper
This is a really great idea. I’d also point to the awful hacks that jinja2
needs to go through to elide jinia2 frames from user tracebacks as an
indicator that this is a desired feature.
https://github.com/pallets/jinja/blob/master/jinja2/debug.py
On Mon, Apr 15, 2019 at 2:08 PM Antoine Pitrou w
I love regular expressions. I would love to see Bra-Ket notation and many of
the popular mathematical forms commonly practiced in engineering and science
supported by the Python language in an expressive and logical way. I feel the
need for expressing mathematical concepts in a standardized and
ereas my solution of next() with a
sentinel is not. (Oh, an alternative would be checking if a.readline(),
b.readline(), and c.readline() are nonempty, but that's not much better and
wouldn't generalize to non-file iterators.)
Nathan
___
On Sat, Apr 25, 2020 at 10:41 AM Steven D'Aprano
wrote:
> On Thu, Apr 23, 2020 at 09:10:16PM -0400, Nathan Schneider wrote:
>
> > How, for example, to collate lines from 3 potentially large files while
> > ensuring they match in length (without an external dependency)? The
of it as something you only
need in special situations.
Is there some logic to the objection that it is weird to have two forms of
zip (or one form with two variants) that are built in, and a third that is
in itertools? Sure. But this seems to me a clear case of practicality beats
purity. As
On Sun, May 17, 2020 at 1:32 PM David Mertz wrote:
> On Sun, May 17, 2020 at 12:22 PM Nathan Schneider
> wrote:
>
>> Let me attempt a metaphor, which won't be perfect but may help:
>>
>> The safety one gets from strictness is a bit like driving a car w
tudy that found this was a common source of errors for
newcomers:
http://dl.acm.org/citation.cfm?id=2960327
-Nathan
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: h
On Wed, Oct 5, 2016 at 1:27 PM, Michel Desmoulin
wrote:
> +1. Python does need better error messages. This and the recent new import
> exception will really help.
>
> Will feature freeze prevent this to get into 3.6 if some champion it?
>
Speaking of, I'm not much of a C hacker, and messing with
On Wednesday, October 5, 2016, Yury Selivanov
wrote:
>
>
> On 2016-10-05 2:50 PM, Nathan Goldbaum wrote:
>
>> On Wed, Oct 5, 2016 at 1:27 PM, Michel Desmoulin <
>> [email protected]>
>> wrote:
>>
>> +1. Python does need better error messag
> performance issues.
>
> And it may not be semantically identical. In the examples above, three
> separate replace calls would work, but a syntax like this ought to be
> capable of an exchange - "aabbccdd".replace(('b', 'd'), ('d
Python has very intuitive and clear syntax, except when it comes to method
definitions, particularly dunder methods.
class Vec(object):
def __init__(self, x, y):
self.x, self.y = x, y
def __add__(self, other):
return Vec(self.x + other.x, self.y + other.y)
def __getitem__
> * __add__ is only part of the addition protocol, there is also
> __radd__ and __iadd__
__iadd__ could be represented as def self += value:.
Reflected binary operators do pose a problem. A possible solution would be
to give self special meaning in this context, so def self + other: would
corresp
ing code that does not belong in the final version.
It seems unlikely that one would purposefully turn on optimization in
conjunction with temporary assertions, so this use case may be irrelevant
to the proposal.
Best,
Nathan
___
Python-ideas mailing list
nltk/nltk/pull/1902/files#diff-454368f06fd635b1e06c9bb6d65bd19bR689
Granted, calling min() and max() on collections of these objects would not
make conceptual sense either. Still, __sort_key__ would have been cleaner
than __lt__.
Cheers,
Nathan
___
Python-ideas mailing list
On Sat, Mar 3, 2018 at 5:12 AM Oleg Broytman wrote:
> On Sat, Mar 03, 2018 at 02:36:39PM +1300, Greg Ewing <
> [email protected]> wrote:
> >[(f(y), g(y)) for x in things where y = h(x)]
> >
> > Possible objections to this:
> >
> > * Requires a new keyword, which may break existing c
e?
>
>
If I understood Mike's proposal correctly it was to allow "," to mean
'given' in this context when followed by EXPRESSION "as" VARIABLE, rather
than its usual iterable-unpacking meaning.
But I think this would cause confusion. Suppose `
7;d probably write this as:
x1, x2 = [(-b + s*sqrt(b**2 - 4*a*c))/(2*a) for s in (1,-1)]
Agreed that the PEP doesn't really help for this use case, but I don't
think it has to. The main use cases in the PEP seem compelling enough to me.
Nathan
___
t;name" refers to an object INSIDE the module, not the module
itself. If I saw
if (match from pattern.search(data)) is not None:
...
I would guess that it is equivalent to
m = next(pattern.search(data))
if m is not None:
...
i.e. that the target is bound to the next item fro
Care would have to be taken in the grammar to avoid syntactic ambiguity.
For example:
x = 1
def not(x):
...
if not - x: # Is this 'not' the keyword or the identifier? not (-x), or not
minus x?
...
Nathan
On Sun, May 13, 2018 at 2:20 PM Guido van Rossum wrote:
> As
This is an interesting proposal. Speaking as a developer of scientific
software packages it would be really cool to have support for something
like this in the language itself.
The software sustainability institute in the UK have written several blog
posts advocating the use of CITATION files cont
On Thu, Jun 28, 2018 at 11:26 PM, Alex Walters
wrote:
> But don't all the users who care about citing modules already use the
> scientific python packages, with scipy itself at it's center? Wouldn't
> those engaging in science or in academia be better stewards of this than
> systems programmers?
Howdy python gang,
First time posting here ~ I've recently encountered that python does not have
an OOTB operator for modulo that is consistent with Euclidean division.
Although it should be easy for anyone who wants this to create it themselves,
it struck me as odd that it was not an already i
The power in programming is the simplicity in keyword and instruction function, I do believe. As much as I love the concept, I feel the use of a data structure to handle such cases circular indexing is needed is more appropriate than changing loop statement behavior.At times I heavily rely on index
29 matches
Mail list logo