Re: Python (was Re: Recent history of vi)
"Peter J. Holzer" <[email protected]> Sun, 21 Dec 2025 13:46:06 +0100
| Newsgroups | gmane.comp.python.general |
|---|---|
| Message-ID | <h2ot2me2xk4f2djnkd7clui2yvcuq3lbhrttjcqkj7glyhwzpo@drcoqdzbobpq> |
On 2025-12-21 04:22:02 +0000, rbowman wrote:
> On Sat, 20 Dec 2025 05:25:25 -0500, c186282 wrote:
>
> > Well, I kind of liked PICK system ... everything was equal, always
> > represented as a string. Numbers, chars, whatever - instantly/easily
> > converted between each other.
> > NO 'types'.
>
> iirc Perl had 5 copies of a scalar just in case you wanted a string or
> character instead of an integer or float.
Those would only be filled in as needed, but yes, if you used a scalar
in many different contexts you could end up with one which was a string,
a float, a signed int and and unsigned int at the same time. And
possibly a unicode string, too. I don't remember whether byte string and
unicode string were mutually exclusive. And the values didn't
necessarily have to match. You could have a scalar which was "IV" in a
string context but 4 in a numerical context. This isn't even rare. The
result of a false comparison (e.g. 1 == 2) is a scalar which is 0 in
numerical context but '' (not '0') in a string context.
hjp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | [email protected] | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmlH7A4ACgkQ8g5IURL+ KF3m4g/+OLjqO42W+uAoJ0xcOgpxlWp9ViYZnV5PUU4A/B6pMuVqlsMC7Dy5nxBm BpFReU66vasQ1S6c13UQ9ncP0gleNgF7VKJceh55IbtKhTkJq7SmYH4RjOguhf5f Td/rZnxucGcC8wBiA4rXEJ4gHPlJ2GvpXo/etiEolp7dd1bn+hhCfjDcQQyiKE+H SfQwVpAmX7xAJxEv+cZFLJlus+wSeJoRqnefaMpStRDxbbQLCDs2m8hsM0b5nWnL VqtdxDILzxZX6o3clv6gJO++O7TCNFaWnGz5R4qiPBoUfvobU0L1ixqxjXlPEyEx 9lQl9sHy2oRQlApEoFaPSeYhtARN9Q0rkoV+i8C4tShwN66YDzr3ZJ0h95i1PO8Q nRdv+OJXaEMssFE6mMa6/7ivCVCuzbN446f1i3OLMq3xtGCQwxFUQNU6kaeDScET kTVnYMgjrt2jGs0BUBaAS6+JUQCarHdDhK4CAxZfxgNJOLDFvoJP46ps2/X+AG5c fFormNNSFeOkc9ZZZnsHuaW94me25nHRoTsHV5OjIf/cz2zhfaWudMsYb0bL2/CW kveH+OGN+sByMmRyTCMipgxw2uicUu6yQEQnlcgMrtQb3PmNDW0QtoUo0v/qQVt9 tam0Tpen5vQS7UC4CwRlzw2icYveqE7JdzjMI+n5sN21vrLZmjk= =NWH3 -----END PGP SIGNATURE-----