There are plenty of use cases if you pause to think. The other objections are
trivial. Even the simplest usage with the input() function is enough to warrant
its inclusion, considering that there are other useless string methods.
As I have had no support for the past few days, I quit the discuss
Le dim. 3 oct. 2021 à 06:01, Stephen J. Turnbull
a écrit :
>
> Laurent Lyaudet writes:
> > Hello,
> >
> > This is a very simple feature request that does not break anything but
> > I don't know if you may find it interesting.
> > It would be nice to have a function or method of list objects t
Hi Laurent,
It is not clear to me what you mean by "filter by indices".
On Sat, Oct 02, 2021 at 10:25:05PM +0200, Laurent Lyaudet wrote:
> The idea is to filter a list by indices :
[...]
> Since filter() returns an iterator instead of a list, it could do what
> is needed... if the callback had a
On Sun, Oct 3, 2021, 1:46 AM Christopher Barker
> The if __name__ block is only required for a Python file to be both a
> module and a script.
> That’s actually a pretty uncommon thing— if it’s a module to be imported
> by other modules, then it probably should be part of a package, and if the
> f
@Marc-Andre
One of the motivations of this proposal is to incentivize writing code in a
local scope, rather than a global one. People in this thread have made the
argument "Python is a scripting language, so it should do that". Ok, fine.
Yes `print('hello world')` is more idiomatic than the one in
I'm somewhat confused by the term "last item of the set", as sets are not
ordered and have no "last" element:
>>> {1,3,3,2}
{1, 2, 3}
On Sat, Oct 2, 2021 at 8:23 PM Abdulla Al Kathiri <
[email protected]> wrote:
> Then use it with the normal expression lambda:
> people.sort(key=p => (p
On Mon, Oct 4, 2021 at 2:02 AM Jonathan Crall wrote:
>
> @Marc-Andre
>
> One of the motivations of this proposal is to incentivize writing code in a
> local scope, rather than a global one. People in this thread have made the
> argument "Python is a scripting language, so it should do that". Ok,
Oh I forgot what if you want to return a set from your lambda? Maybe a lambda
set should at least have one assignment statement to qualify it as one.
Expressions only inside a set syntax will be just a normal set that doesn’t
care about order as you pointed out. But a lambda set will care about
On Sat, Oct 2, 2021, 11:20 PM Christopher Barker
wrote:
[Snip...]
>
> But sure, if we can eliminate inefficiencies in Python standard data
> types, then why not?
>
I agree. If we can eliminate inefficiencies in core Python features, that
would be great.
I don't work with this kind of thing, so
Greetings list,
> I disagree that "it teaches a lot about how Python works" is a good
reason to keep things the way they are. If you applied this principle more
broadly, it would seem to be an argument in favour of complexity in most
situations, that would imply we should keep syntactic sugar to a
10 matches
Mail list logo