efore using it and then you can adjust what you give it to match allowed
configurations. Many languages have such needs and some of them do things
differently. As an example, a language like R allows you to say
do.call(func, list) which goes and calls func() with the expanded arguments
taken from th
On 2/21/2023 8:52 PM, Hen Hanna wrote:
On Tuesday, February 21, 2023 at 10:39:54 AM UTC-8, Thomas Passin wrote:
On 2/21/2023 12:32 PM, Axy via Python-list wrote:
On 21/02/2023 04:13, Hen Hanna wrote:
(A) print( max( * LisX ))
(B) print( sum( * LisX ))
On Tuesday, February 21, 2023 at 10:39:54 AM UTC-8, Thomas Passin wrote:
> On 2/21/2023 12:32 PM, Axy via Python-list wrote:
> > On 21/02/2023 04:13, Hen Hanna wrote:
> >>
> >> (A) print( max( * LisX ))
> >> (B) print( sum( * LisX ))<--- Bad
> >
inds of arguments and especially those that are
either compatible or implement some protocol, and so on. When you view
things that way, the design of max() and sum() may well make quite a bit
more sense and also why they are not identically designed.
-Original Message-
From: Python-list
On 21/02/2023 19:11, avi.e.gr...@gmail.com wrote:
In your own code, you may want to either design your own functions, or use them
as documented or perhaps create your own wrapper functions that carefully
examine what you ask them to do and re-arrange as needed to call the
function(s) you want
On Tuesday, February 21, 2023 at 9:33:29 AM UTC-8, Axy wrote:
> On 21/02/2023 04:13, Hen Hanna wrote:
> >
> > (A) print( max( * LisX ))
> > (B) print( sum( * LisX )) <--- Bad syntax !!!
> >
> > What's most surprising is (A) is ok, and (B) is not.
> >
> > even tho' max() and sum() hav
--
From: Python-list On
Behalf Of Roel Schroeven
Sent: Tuesday, February 21, 2023 1:11 PM
To: python-list@python.org
Subject: Re: Tuple Comprehension ???
Hen Hanna schreef op 21/02/2023 om 5:13:
> (A) print( max( * LisX ))
> (B) print( sum( * LisX ))
On 2/21/2023 12:32 PM, Axy via Python-list wrote:
On 21/02/2023 04:13, Hen Hanna wrote:
(A) print( max( * LisX ))
(B) print( sum( * LisX )) <--- Bad
syntax !!!
What's most surprising is (A) is ok, and (B) is not.
even th
Hen Hanna schreef op 21/02/2023 om 5:13:
(A) print( max( * LisX ))
(B) print( sum( * LisX ))<--- Bad syntax !!!
What's most surprising is (A) is ok, and (B) is not.
even tho' max() and sum() have (basically) the same
res making a generator first.
-Original Message-
From: Python-list On
Behalf Of Hen Hanna
Sent: Monday, February 20, 2023 11:14 PM
To: python-list@python.org
Subject: Re: Tuple Comprehension ???
On Monday, February 20, 2023 at 7:57:14 PM UTC-8, Michael Torrie wrote:
> On 2/20/23 20:3
On 21/02/2023 04:13, Hen Hanna wrote:
(A) print( max( * LisX ))
(B) print( sum( * LisX ))<--- Bad syntax !!!
What's most surprising is (A) is ok, and (B) is not.
even tho' max() and sum() have (basically) the same sy
On Monday, February 20, 2023 at 7:57:14 PM UTC-8, Michael Torrie wrote:
> On 2/20/23 20:36, Hen Hanna wrote:
> > For a while, i've been curious about a [Tuple Comprehension]
> I've never heard of a "Tuple comprehension." No such thing exists as
> far as I know.
> > So finally i tried it, and the
On 20Feb2023 19:36, Hen Hanna wrote:
For a while, i've been curious about a [Tuple Comprehension]
So finally i tried it, and the result was a bit surprising...
X= [ x for x in range(10) ]
This is a list comprehension, resulting in a list as its result.
X= ( x for x in range(10) )
be immutable. There can be other
benefits such as storage space used. And in many ways, tuples are supposed
to be faster than lists.
-Original Message-
From: Python-list On
Behalf Of Michael Torrie
Sent: Monday, February 20, 2023 10:57 PM
To: python-list@python.org
Subject: Re: Tuple
On 2/20/23 20:36, Hen Hanna wrote:
> For a while, i've been curious about a [Tuple Comprehension]
I've never heard of a "Tuple comprehension." No such thing exists as
far as I know.
> So finally i tried it, and the result was a bit surprising...
>
>
> X= [ x for x in range(10) ]
> X= (
15 matches
Mail list logo