Re: xkcd.com/353 ( Flying with Python )

Liste des GroupesRevenir à cl python 
Sujet : Re: xkcd.com/353 ( Flying with Python )
De : python (at) *nospam* mrabarnett.plus.com (MRAB)
Groupes : comp.lang.python
Date : 30. Mar 2024, 18:31:59
Autres entêtes
Message-ID : <mailman.34.1711816508.3468.python-list@python.org>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 2024-03-30 11:25, Skip Montanaro via Python-list wrote:
>
https://xkcd.com/1306/
                          what does  SIGIL   mean?
>
I think its' a Perl term, referring to the $/@/# symbols in front of
identifiers.
>
 I had a vague recollection of hearing it elsewhere (*Game of Thrones,* on
the armies' battle flags?), but didn't know what it meant. Google tells me:
 *an inscribed or painted symbol considered to have magical power.*
 So, they're more than just line noise. They confer power on their users...
 Perhaps '@' in the context of decorators is the most prominent example in
Python, since decorators technically don't allow the programmer to do
something they couldn't before, but are now are used everywhere, a key
feature of many applications and modules.
 Magical-ly, y'rs,
 
I wouldn't consider '@' to be a sigil any more than I would a unary minus.
In Perl there's the prefixes $ (scalar), @ (array) and % (hash/dictionary), but also & (function), although it's rare because there's also the () afterwards.
Variables in PHP have the prefix $ and only $.
In old versions of BASIC, string variables had the suffix $, and integer variables the suffix %. Some versions also had the suffix # (for double precision, I think).

Date Sujet#  Auteur
30 Mar 24 * xkcd.com/353 ( Flying with Python )17HenHanna
30 Mar 24 +* Re: xkcd.com/353 ( Flying with Python )8Greg Ewing
30 Mar 24 i+- Re: xkcd.com/353 ( Flying with Python )1HenHanna
30 Mar 24 i+- Re: xkcd.com/353 ( Flying with Python )1Skip Montanaro
30 Mar 24 i+- Re: xkcd.com/353 ( Flying with Python )1MRAB
30 Mar 24 i+- Re: xkcd.com/353 ( Flying with Python )1Alan Gauld
31 Mar 24 i+- Re: xkcd.com/353 ( Flying with Python )1Mats Wichmann
31 Mar 24 i+- Re: xkcd.com/353 ( Flying with Python )1Peter J. Holzer
31 Mar 24 i`- Re: xkcd.com/353 ( Flying with Python )1Peter J. Holzer
30 Mar 24 +* Re: xkcd.com/353 ( Flying with Python )2Blue-Maned_Hawk
4 Apr 24 i`- Re: xkcd.com/353 ( Flying with Python )1HenHanna
30 Mar 24 +* Re: xkcd.com/353 ( Flying with Python )5Johanne Fairchild
30 Mar 24 i+* Re: xkcd.com/353 ( Flying with Python )2HenHanna
1 Apr 24 ii`- Re: xkcd.com/353 ( Flying with Python )1inhahe
1 Apr 24 i+- Re: xkcd.com/353 ( Flying with Python )1PA
1 Apr 24 i`- Re: xkcd.com/353 ( Flying with Python )1PA
3 Apr 24 `- Re: xkcd.com/353 ( Flying with Python )1HenHanna

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal