On mer., Apr 3, 2019 at 6:00 PM, python-list-requ...@python.org wrote:
On Wed, Apr 3, 2019 at 3:55 AM Alexey Muranov
wrote:
I clarified what i meant by an assignment, and i believe it to be a
usual meaning.
1. `def` is not an assignment, there is no left-hand side or
right-hand side. I w
On Wed, Apr 3, 2019 at 3:55 AM Alexey Muranov wrote:
> I clarified what i meant by an assignment, and i believe it to be a
> usual meaning.
>
> 1. `def` is not an assignment, there is no left-hand side or
> right-hand side. I was talking about the normal assignment by which
> anyone can bind any
On mar., Apr 2, 2019 at 6:00 PM, python-list-requ...@python.org wrote:
On Tue, Apr 2, 2019 at 1:43 AM Alexey Muranov
wrote:
> On Mon, Apr 1, 2019 at 3:52 PM Alexey Muranov gmail.com>
> wrote:
> >
> > I only see a superficial analogy with `super()`, but perhaps it
is
> > because you
On Tue, Apr 2, 2019 at 1:43 AM Alexey Muranov
wrote:
>
> > On Mon, Apr 1, 2019 at 3:52 PM Alexey Muranov > gmail.com>
> > wrote:
> > >
> > > I only see a superficial analogy with `super()`, but perhaps it is
> > > because you did not give much details of you suggestion.
> >
> > No, it's because t
On Mon, Apr 1, 2019 at 3:52 PM Alexey Muranov gmail.com>
wrote:
>
> I only see a superficial analogy with `super()`, but perhaps it is
> because you did not give much details of you suggestion.
No, it's because the analogy was not meant to be anything more than
superficial. Both are constructs of
On Tue, Apr 2, 2019 at 6:04 PM Ian Kelly wrote:
> > Note that
> >
> > foo.bar = baz
> >
> > and
> >
> > foo[bar] = baz
>
> I wrote "directly assigned to a variable", not to an attribute or an item.
> These are not part of the suggestion.
So what's the advantage over just using def?
Chris
On Mon, Apr 1, 2019 at 3:52 PM Alexey Muranov
wrote:
>
> I only see a superficial analogy with `super()`, but perhaps it is
> because you did not give much details of you suggestion.
No, it's because the analogy was not meant to be anything more than
superficial. Both are constructs of syntactic
On lun., avril 1, 2019 at 6:00 PM, python-list-requ...@python.org wrote:
On Sun, Mar 31, 2019 at 1:09 PM Alexey Muranov
wrote:
On dim., Mar 31, 2019 at 6:00 PM, python-list-requ...@python.org
wrote:
> On Sat, Mar 30, 2019, 5:32 AM Alexey Muranov
>
> wrote:
>
>>
>> On ven., Mar 29,
, saying that it is a
generator
and describing what it does. I realize I'm calling on the programmer to
address this issue by adding doc strings. Nonetheless adding doc strings is a
good habit to get in to.
--- Joseph S.
-Original Message-
From: Ian Kelly
Sent: Sunday, March 31,
On Sun, Mar 31, 2019 at 1:09 PM Alexey Muranov
wrote:
>
> On dim., Mar 31, 2019 at 6:00 PM, python-list-requ...@python.org wrote:
> > On Sat, Mar 30, 2019, 5:32 AM Alexey Muranov
> >
> > wrote:
> >
> >>
> >> On ven., Mar 29, 2019 at 4:51 PM, python-list-requ...@python.org
> >> wrote:
> >> >
> >
On dim., Mar 31, 2019 at 6:00 PM, python-list-requ...@python.org wrote:
On Sat, Mar 30, 2019, 5:32 AM Alexey Muranov
wrote:
On ven., Mar 29, 2019 at 4:51 PM, python-list-requ...@python.org
wrote:
>
> There could perhaps be a special case for lambda expressions such
> that,
> when the
On Sat, Mar 30, 2019, 5:32 AM Alexey Muranov
wrote:
>
> On ven., Mar 29, 2019 at 4:51 PM, python-list-requ...@python.org wrote:
> >
> > There could perhaps be a special case for lambda expressions such
> > that,
> > when they are directly assigned to a variable, Python would use the
> > variable
On ven., Mar 29, 2019 at 4:51 PM, python-list-requ...@python.org wrote:
On Thu, Mar 28, 2019 at 2:30 PM Alexey Muranov
wrote:
On jeu., mars 28, 2019 at 8:57 PM, Terry Reedy
wrote:
> Throwing the name away is foolish. Testing functions is another
> situation in which function names
On 27/03/19 09:21, Alexey Muranov wrote:
> Whey you need a simple function in Python, there is a choice between a
> normal function declaration and an assignment of a anonymous function
> (defined by a lambda-expression) to a variable:
>
> def f(x): return x*x
>
> or
>
> f = lambda x: x*x
>
>
On 3/28/2019 12:29 PM, Alexey Muranov wrote:
On jeu., Mar 28, 2019 at 5:00 PM, python-list-requ...@python.org wrote:
So my opinion is that lambda expressions should only be used within
larger expressions and never directly bound.
It would be however more convenient to be able to write inste
On Fri, Mar 29, 2019 at 7:29 AM Alexey Muranov wrote:
> My idea however was to have it as an exact synonyme of an assignment of
> a lambda. Assignment is an assignment, it should not modify the
> attributs of the value that is being assigned.
Assigning lambda functions to names generally shouldn'
On Thu, Mar 28, 2019 at 2:30 PM Alexey Muranov
wrote:
>
> On jeu., mars 28, 2019 at 8:57 PM, Terry Reedy wrote:
> > Throwing the name away is foolish. Testing functions is another
> > situation in which function names are needed for proper report.
>
> My idea however was to have it as an exact s
On jeu., mars 28, 2019 at 5:00 PM, python-list-requ...@python.org wrote:
So documentation of that syntax would 100% be required
Regarding documentation, i believe there would be 3 line to add:
() =
is a syntactic sugar for
= lambda :
Alexey.
--
https://mail.python.org/mailman
On jeu., mars 28, 2019 at 8:57 PM, Terry Reedy wrote:
On 3/28/2019 12:29 PM, Alexey Muranov wrote:
On jeu., Mar 28, 2019 at 5:00 PM, python-list-requ...@python.org
wrote:
So my opinion is that lambda expressions should only be used within
larger expressions and never directly bound.
It w
On jeu., mars 28, 2019 at 8:57 PM, Terry Reedy wrote:
But i see your point about never assigning lambdas directly, it
makes sense. But sometimes i do assign short lambdas directly to
variable.
Is the convenience and (very low) frequency of applicability worth
the inconvenience of confu
On jeu., mars 28, 2019 at 5:00 PM, python-list-requ...@python.org wrote:
On 2019-03-27 10:42 a.m., Paul Moore wrote:
On Wed, 27 Mar 2019 at 12:27, Alexey Muranov
wrote:
On mer., mars 27, 2019 at 10:10 AM, Paul Moore
wrote:
On Wed, 27 Mar 2019 at 08:25, Alexey Muranov
wrote:
Whey yo
On Wed, Mar 27, 2019 at 3:13 AM Paul Moore wrote:
>
> On Wed, 27 Mar 2019 at 08:25, Alexey Muranov
wrote:
> >
> > Whey you need a simple function in Python, there is a choice between a
> > normal function declaration and an assignment of a anonymous function
> > (defined by a lambda-expression) t
On jeu., Mar 28, 2019 at 5:00 PM, python-list-requ...@python.org wrote:
So my opinion is that lambda expressions should only be used within
larger expressions and never directly bound.
It would be however more convenient to be able to write instead just
f(x) = x*x
Given my view above,
On 27/03/19 22:25, Terry Reedy wrote:
> ...
>
> Before 3.8, I would stop here and say no to the proposal. But we now
> have assignment expressions in addition to assignment statements.
>
> >>> int(s:='42'+'742')
> 42742
> >>> s
> '42742'
>
> To me, function assignment expressions, as a enhanced re
Alexey Muranov writes:
> It would be however more convenient to be able to write instead just
>
>f(x) = x*x
That's not an anonymous function then, is it? You want to assign a name
to that function, and (to be useful in development tools, such as a
stack trace) the function needs to know its
On 3/27/2019 4:21 AM, Alexey Muranov wrote:
Whey you need a simple function in Python, there is a choice between a
normal function declaration and an assignment of a anonymous function
(defined by a lambda-expression) to a variable:
def f(x): return x*x
or
f = lambda x: x*x
PEP 8 p
On mer., Mar 27, 2019 at 5:00 PM, python-list-requ...@python.org wrote:
On 27/03/19 09:21, Alexey Muranov wrote:
Whey you need a simple function in Python, there is a choice
between a
normal function declaration and an assignment of a anonymous
function
(defined by a lambda-expression) to a
On 2019-03-27 10:42 a.m., Paul Moore wrote:
> On Wed, 27 Mar 2019 at 12:27, Alexey Muranov wrote:
>> On mer., mars 27, 2019 at 10:10 AM, Paul Moore
>> wrote:
>>> On Wed, 27 Mar 2019 at 08:25, Alexey Muranov
>>> wrote:
Whey you need a simple function in Python, there is a choice
betwee
On 27/03/2019 16:15, Bev in TX wrote:
On Mar 27, 2019, at 10:41 AM, Antoon Pardon wrote:
I don't know. Something like the following is already legal:
f(x)[n] = x * n
And it does something completly different.
Where would I find information on what this does in the documentation?
Nowhere
> On Mar 27, 2019, at 10:41 AM, Antoon Pardon wrote:
>
> I don't know. Something like the following is already legal:
>
> f(x)[n] = x * n
>
> And it does something completly different.
Where would I find information on what this does in the documentation?
Bev in TX
--
https://mail.pytho
On 27/03/19 09:21, Alexey Muranov wrote:
> Whey you need a simple function in Python, there is a choice between a
> normal function declaration and an assignment of a anonymous function
> (defined by a lambda-expression) to a variable:
>
> def f(x): return x*x
>
> or
>
> f = lambda x: x*x
>
>
On Wed, 27 Mar 2019 at 12:27, Alexey Muranov wrote:
>
> On mer., mars 27, 2019 at 10:10 AM, Paul Moore
> wrote:
> > On Wed, 27 Mar 2019 at 08:25, Alexey Muranov
> > wrote:
> >>
> >> Whey you need a simple function in Python, there is a choice
> >> between a
> >> normal function declaration and
On mer., mars 27, 2019 at 10:10 AM, Paul Moore
wrote:
On Wed, 27 Mar 2019 at 08:25, Alexey Muranov
wrote:
Whey you need a simple function in Python, there is a choice
between a
normal function declaration and an assignment of a anonymous
function
(defined by a lambda-expression) to
On Wed, 27 Mar 2019 at 08:25, Alexey Muranov wrote:
>
> Whey you need a simple function in Python, there is a choice between a
> normal function declaration and an assignment of a anonymous function
> (defined by a lambda-expression) to a variable:
>
> def f(x): return x*x
>
> or
>
> f = l
Whey you need a simple function in Python, there is a choice between a
normal function declaration and an assignment of a anonymous function
(defined by a lambda-expression) to a variable:
def f(x): return x*x
or
f = lambda x: x*x
It would be however more convenient to be able to write
35 matches
Mail list logo