Steven D'Aprano writes:
> On Thu, Mar 17, 2022 at 01:21:24AM +0900, Stephen J. Turnbull wrote:
>
> > MRAB writes:
> >
> > > I'm wondering whether an alterative could be a function for splicing
> > > sequences such as lists and tuples which would avoid the need to create
> > > and then
On Fri, 18 Mar 2022 at 00:31, David Mertz, Ph.D. wrote:
>
> I just do this myself in my text editor (vim):
>
>
> But this is just cosmetic because I like to look at it this way. The actual
> file on disk contains `set()`, `<=`, `in`, `not in` and wouldn't be a problem
> for anyone without the s
I just do this myself in my text editor (vim):
[image: sets-py.png]
But this is just cosmetic because I like to look at it this way. The
actual file on disk contains `set()`, `<=`, `in`, `not in` and wouldn't be
a problem for anyone without the same fonts installed, or require anyone to
know odd
On Thu, Mar 17, 2022 at 08:38:19AM -0400, Ricky Teachey wrote:
> Not a pro or con just an observation: since dictionaries are ordered now
> people would also (somewhat reasonably, imo) want to be able to splice
> them, too.
Dicts are not sequences. They might preserve insertion order, but that
i
On Thu, 17 Mar 2022 at 23:19, Stéfane Fermigier wrote:
>
> The “correct” (according to Bourbaki) mathematical notation for an empty set
> is “∅" (aka Unicode U+2205, or HTML ∅)
>
> Some time ago, for a project which had a lot of empty sets, I tried to use
> this symbol as a short hand for set().
On Thu, Mar 17, 2022, 5:23 AM Steven D'Aprano wrote:
On Thu, Mar 17, 2022 at 01:21:24AM +0900, Stephen J. Turnbull wrote:
> MRAB writes:
>
> > I'm wondering whether an alterative could be a function for splicing
> > sequences such as lists and tuples which would avoid the need to create
> > a
Hmm, I think the idea of the mathematical symbol is interesting, but I
think users are more interested in constructing a new, eventually-not-empty
set, than referencing the empty set.
Semantically, I don't know if ∅() is satisfying.
On Thu, Mar 17, 2022 at 08:19 Stéfane Fermigier wrote:
> The “
On 17/03/2022 05.21, Stephen J. Turnbull wrote:
> MRAB writes:
>
> > I'm wondering whether an alterative could be a function for splicing
> > sequences such as lists and tuples which would avoid the need to create
> > and then destroy intermediate sequences:
> >
> > splice(alist, i, 1
The “correct” (according to Bourbaki) mathematical notation for an empty
set is “∅" (aka Unicode U+2205, or HTML ∅)
Some time ago, for a project which had a lot of empty sets, I tried to use
this symbol as a short hand for set(). But:
>>> ⦰ = set()
File "", line 1
⦰ = set()
^
SyntaxErr
14.03.22 15:07, Joao S. O. Bueno пише:
- but what about keeping what exists and adding {,} for an empty set?
(it is not that unlike the one-element tuple, which already exists)
If you want to create an empty set without using any identifier, use
{*()}. The advantage is that it works in old Py
On Thu, Mar 17, 2022 at 01:21:24AM +0900, Stephen J. Turnbull wrote:
> MRAB writes:
>
> > I'm wondering whether an alterative could be a function for splicing
> > sequences such as lists and tuples which would avoid the need to create
> > and then destroy intermediate sequences:
> >
> >
11 matches
Mail list logo