Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Heisenberg may have been here.


devel / comp.lang.python / Re: .0 in name

SubjectAuthor
o Re: .0 in nameAvi Gross

1
Re: .0 in name

<mailman.407.1652491328.20749.python-list@python.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=18268&group=comp.lang.python#18268

 copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: avigr...@verizon.net (Avi Gross)
Newsgroups: comp.lang.python
Subject: Re: .0 in name
Date: Sat, 14 May 2022 01:22:00 +0000 (UTC)
Lines: 82
Message-ID: <mailman.407.1652491328.20749.python-list@python.org>
References: <l1isnpjg3a7rw2idr2292brx.1652460222322@email.android.com>
<518526689.1761138.1652479321306@mail.yahoo.com>
<1769701111.1786559.1652491320385@mail.yahoo.com>
Reply-To: Avi Gross <avigross@verizon.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de LOkBEJ9QnFUG7KGlyMwgIA7fTxxfkiOh6qrN8M9Symtg==
Return-Path: <avigross@verizon.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=verizon.net header.i=@verizon.net header.b=fkaDCc6n;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.146
X-Spam-Level: *
X-Spam-Evidence: '*H*': 0.71; '*S*': 0.00; '2022': 0.05; 'variable':
0.05; 'spaces': 0.07; 'subject:name': 0.07; '171);': 0.09;
'blank': 0.09; 'numeric': 0.09; 'output:': 0.09; 'parse': 0.09;
'prompt.': 0.09; 'rarely': 0.09; '&gt;': 0.14; 'import': 0.15;
'url:mailman': 0.15; 'aol': 0.16; 'avi': 0.16; 'column': 0.16;
'context.': 0.16; 'doc': 0.16; 'gross': 0.16; 'need\xc2\xa0to':
0.16; 'outline:': 0.16; 'parsing': 0.16; 'subject:: .': 0.16;
'unicode': 0.16; 'url:comp': 0.16; "aren't": 0.19; 'to:addr
:python-list': 0.20; 'languages': 0.22; 'fri,': 0.22; 'code':
0.23; 'to:name:python-list@python.org': 0.24; 'skip:- 10': 0.25;
'url-ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24': 0.25;
'python,': 0.25; 'url:listinfo': 0.25; 'cannot': 0.25;
'programming': 0.25; 'url-ip:188.166/16': 0.25; 'anyone': 0.25;
'object': 0.26; 'leave': 0.27; 'bit': 0.27; 'email
addr:python.org&gt;': 0.28; 'suggest': 0.28; 'url-ip:188/8': 0.31;
'13,': 0.32; 'assume': 0.32; 'fine.': 0.32; 'python-list': 0.32;
'requiring': 0.32; 'zero': 0.32; 'unless': 0.32; 'but': 0.32;
'there': 0.33; 'mean': 0.34; 'header:In-Reply-To:1': 0.34;
'following': 0.35; 'cases': 0.36; 'possibly': 0.36; 'work,': 0.36;
'special': 0.37; 'really': 0.37; 'hard': 0.37; 'others': 0.37;
'means': 0.38; 'read': 0.38; 'valid': 0.39; 'use': 0.39; 'exact':
0.40; 'serious': 0.40; 'should': 0.40; 'lack': 0.60; 'font-
family:': 0.60; 'initial': 0.61; 'skip:o 10': 0.61; 'url:amp':
0.62; 'from:': 0.62; 'to:': 0.62; 'seen': 0.62; 'skip:\xc2 10':
0.62; 'arial,': 0.62; 'feel': 0.63; '0px;': 0.63; 'skip:b 10':
0.63; 're:': 0.64; 'look': 0.65; 'let': 0.66; 'numbers': 0.67;
'[1]': 0.67; 'exactly': 0.68; 'and,': 0.69; 'perfectly': 0.69;
'sans-serif;': 0.70; '1000': 0.70; 'rules': 0.70; 'url:info':
0.71; '....': 0.76; 'documented': 0.76; 'issued': 0.76; 'out,':
0.78; 'sent:': 0.78; 'header:Reply-To:1': 0.79; 'period': 0.81;
'unusual': 0.81; 'href=""': 0.84; 'reasons': 0.84; 'characters':
0.84; 'email name:&lt;python-list': 0.84; 'exceptions': 0.84;
'lines,': 0.84; 'periods': 0.84; 'pmsubject:': 0.84; 'skip:p 50':
0.84; 'stupid': 0.84; 'url-ip:74.208/16': 0.84; 'url:ved': 0.84;
'illustration': 0.91; 'samsung': 0.91; 'tend': 0.91; 'boy': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verizon.net; s=a2048;
t=1652491324; bh=Av6vXWiZHT5gINBOVGoIg4DEHcJ9IKQ0RK1gDVd47vI=;
h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject:Reply-To;
b=fkaDCc6ndYz5Y8LvwSaX4sS9BCPnMgw7G1KJKFraPQZ7oT3eeemkiMzTCVbPIWEKBaRnbvTTJ2+l6nq2dvjWTaSWQuKaB01/PozzT69uK/N0QYga4Yh2skjukaUhf9A0pAc85ThU+7YmoOxua5FjhMkcu/FWef+H2AkKvetjmTnMuQ9Mo1ix8m40mAf5+JoZ1mEwnpwebH0u6b9hrM1kBBVcNStn+EELuJk0FWgHauP3X2V81e+kxq9T5Eg0ZfP4Fbt62mWKv57Gh2c5CjQ/S5vk5531ylCEJMipbcxtf3BOKByyFfkPrE3GYWA6UuT5f9a/l9oxIZn5DrjTwCq12Q==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
t=1652491324; bh=/8UsiUTF1r7lkBmRDJiL6G15dc4PipKI2SwNAcuW5q2=;
h=X-Sonic-MF:Date:From:To:Subject:From:Subject;
b=jNDDKVH1JY13KaR4pAM41BwGKLo4hoDNI06oF1fhxFaVdcGqfkQI1CkdL3mVEgCv4ItUjcsEhrpEpXX010A+0IpG6hiB1q4tnlvZOjqvfBlMDi2NFj3HFV5trSWzWNk8zAGWCyY6txhxGX+czW5Qgi1P7WwjF/feioEmunuZjtNaWV0ytkdsClz47Tk517u9w8ZKamthNyoW/3dTAQxpgzdrejvBLrLrWzz9SZp5yJSE9NcvRA44CVKa6A4GhMo7XfFJzG8WVvDw2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6Ihl5aWDkqR9IHxNKLojGvmGiDRtI.s.6gavdIJPHGf7fBK8uYqmFzf5N2epjj4b
yV.EKNkA_ZiOo1pRZot67C6nO_AkympjRnjPXFAG9.OvnBkdn02G79iY1VQfY_hICSOhLpkknB6w
c8aykloLWix.qYixXfeEo.RpdA82KQnCAdjCoPBdZZTSBaD4ECCm1EKHXa2XDGuKxA8x6AXcDo1F
WrhWXZqh1FfZkXnO6xtKP0ml5.Oc.kQ--
X-Sonic-MF: <avigross@verizon.net>
In-Reply-To: <518526689.1761138.1652479321306@mail.yahoo.com>
X-Mailer: WebService/1.1.20188 aolwebmail
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <1769701111.1786559.1652491320385@mail.yahoo.com>
X-Mailman-Original-References: <l1isnpjg3a7rw2idr2292brx.1652460222322@email.android.com>
<518526689.1761138.1652479321306@mail.yahoo.com>
 by: Avi Gross - Sat, 14 May 2022 01:22 UTC

Boy do I hate when I see my code mangled by the stupid AOL mailer.

Not that anyone cares, but the code should be read with each line starting with the "> " prompt.

If I leave lots of blank lines, it may work, but as the illustration is not in python, I will now remove the prompts:

`5x^2 + 2.3x` <- 666

`+-+-+` <- 1000

1 + 2 * `5x^2 + 2.3x` + `+-+-+`

output: 2333 

There are rarely good reasons for such silly variable names but as long as you let it know to leave the quoted regions alone when parsing and look them us as exact entries in various environments, it works fine.

To add to what others already wrote, many languages have serious requirements you need to be aware of and not assume otherwise. Some allow underscores in names and may limit that in the first part or may in some cases suggest or require it. Some have rules about whether a variable of one kind should start with an uppercase letter. Some allow periods in names although an initial period may make it invisible for some purposes. And, some newer languages allow all kinds of UNICODE characters and perhaps even some that can be seen as numeric but aren't exactly 0-9. 

① ② ③
 ... ❽ ❽

-----Original Message-----
From: Avi Gross via Python-list <python-list@python.org>
To: python-list@python.org <python-list@python.org>
Sent: Fri, May 13, 2022 6:02 pm
Subject: Re: .0 in name

Bryan,
As has been pointed out, it is very common in possibly all programming languages to not allow digits at the start of many identifiers. It makes it hard to parse for numbers which tend to start with digits. Some languages even have special rules on not starting a number with a zero unless you mean for it to be seen as octal (or 0x for hexadecimal) and many other rules exist.

There are languages where 12x means 12*x so even the lack of an operator ....

There are exceptions that often are not really exceptions. You can use all kinds of unusual variables in some quoted context. It is valid (albeit not encouraged) to use backquoted

The following is perfectly allowed in R:

> `5x^2 + 2.3x` <- 666 > `+-+-+` <- 1000 > 1 + 2 * `5x^2 + 2.3x` + `+-+-+` [1] 2333 
And there are often issued when you do things like create the name of a column of data in a data.frame with embedded spaces and other anomalies requiring special handling.
So why you wonder where it is documented that variables cannot be what you feel like is a bit puzzling! 

-----Original Message-----
From: bryangan41 <bryangan41@gmail.com>
To: python-list@python.org
Sent: Fri, May 13, 2022 12:47 pm
Subject: .0 in name

May I know (1) why can the name start with a number?(2) where in the doc is it?!>>> import pdb>>> pdb.run('(a for a in "")')> <string>(1)<module>()(Pdb) s--Call--> <string>(1)<genexpr>()(Pdb) a.0 = <str_iterator object at 0xb685b100>(Pdb) c>>>Sent from Samsung tablet.
--
https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor