On 25/07/2019 19.41, Andrew Barnert via Python-ideas wrote:
> On Jul 25, 2019, at 09:46, Batuhan Taskaya wrote:
>> I think it looks very fine when you type {1, 2, 3} * {"a", "b", "c"} and get
>> set(itertools.product({1, 2, 3}, {"a", "b", "c"})). So i am proposing set
>> multiplication
On 07/27/2019 03:17 AM, Batuhan Taskaya wrote:
Its more clear and understandable than itertools.product for people from outside of
a programming background. The simplicity is useful when we are working with
multiple expressions at sametime. (cset(a & b) * cset(a | b))
So build that
IMO if you need the concrete Cartesian product instantiated you're
probably doing something wrong, or you're addicted to a certain kind of
programming competitions with highly mathematical puzzles.
itertools.product() is good enough for the occasional legitimate use case
(I think I recall
Python is for simplicity. It would be really cool to do such shortcuts
instead of import itertools; itertools.product everytime.
On Fri, Jul 26, 2019 at 2:55 PM Greg Ewing
wrote:
> Andrew Barnert via Python-ideas wrote:
> > The usual set-theoretic definition of tuples is just recursively as
>
Andrew Barnert via Python-ideas wrote:
The usual set-theoretic definition of tuples is just recursively as ordered
pairs: () is 0, (a) is a, (a, b) is , (a, b, c) is <, c>, etc.
So, you don’t have to gloss over anything; s1 * s2 * s3 gives you elements
((a, b), c), but those are identical to
On Jul 25, 2019, at 14:57, Chris Angelico wrote:
>
>> On Fri, Jul 26, 2019 at 7:47 AM Greg Ewing
>> wrote:
>>
>> Also, this would really only work sensibly for Cartesian products of
>> two sets, not three or more. Writing s1 * s2 * s3 wouldn't give you
>> a set of 3-tuples (a, b, c), but a
On Fri, Jul 26, 2019 at 7:47 AM Greg Ewing wrote:
>
> Batuhan Taskaya wrote:
> > I think it looks very fine when you type {1, 2, 3} * {"a", "b", "c"} and
> > get set(itertools.product({1, 2, 3}, {"a", "b", "c"})). So i am
> > proposing set multiplication implementation as cartesian product.
>
>
Batuhan Taskaya wrote:
I think it looks very fine when you type {1, 2, 3} * {"a", "b", "c"} and
get set(itertools.product({1, 2, 3}, {"a", "b", "c"})). So i am
proposing set multiplication implementation as cartesian product.
I'm not sure this would be used frequently enough to justify making
On Jul 25, 2019, at 09:46, Batuhan Taskaya wrote:
>
> I think it looks very fine when you type {1, 2, 3} * {"a", "b", "c"} and get
> set(itertools.product({1, 2, 3}, {"a", "b", "c"})). So i am proposing set
> multiplication implementation as cartesian product.
I think it might make more
And i know this is proposed before but it should be reconsidered under
steering council.
On Thu, Jul 25, 2019 at 7:46 PM Batuhan Taskaya
wrote:
> I think it looks very fine when you type {1, 2, 3} * {"a", "b", "c"} and
> get set(itertools.product({1, 2, 3}, {"a", "b", "c"})). So i am proposing
10 matches
Mail list logo