Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Cobol programmers are down in the dumps.


devel / comp.lang.python / def ReadAHumanString(s) in action

SubjectAuthor
o def ReadAHumanString(s) in actionmoi

1
def ReadAHumanString(s) in action

<45fc699b-bc20-4939-86d7-40f5ae9dc0b0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
X-Forwarded-Encrypted: i=1; AJvYcCVa30H82yj+CRfGBj/b0/JMG2LzB00PaLoVc98JrqxMpdVUc4NwAZHCjdpyOQRLJBiiSSVPl80J6J3L8SiZmMgu4TtE9BZZRyRTYp3y2feTWc7OSmQ=
X-Received: by 2002:a05:6214:4018:b0:68f:5d8f:7bfc with SMTP id kd24-20020a056214401800b0068f5d8f7bfcmr352870qvb.4.1708354169562;
Mon, 19 Feb 2024 06:49:29 -0800 (PST)
X-Forwarded-Encrypted: i=1; AJvYcCX2C0t3oe7T5WVkZ4FG8/8vvEEZzVn1eanznzL324LDmJvZXBNrUdmDPbC0o5bPdT4aK3BKjyvj6ee7llzGXUzmwSiKvl9smLmrh02CcoUNvT6o
X-Received: by 2002:a05:6870:64a1:b0:204:20:2c68 with SMTP id
cz33-20020a05687064a100b0020400202c68mr377116oab.1.1708354169317; Mon, 19 Feb
2024 06:49:29 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Mon, 19 Feb 2024 06:49:29 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:1210:6807:fa00:c948:f957:11e0:50c7;
posting-account=ung4FAoAAAC46zhHJ0Nsnuox7M5gDvs_
NNTP-Posting-Host: 2a02:1210:6807:fa00:c948:f957:11e0:50c7
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <45fc699b-bc20-4939-86d7-40f5ae9dc0b0n@googlegroups.com>
Subject: def ReadAHumanString(s) in action
From: wxjmfa...@gmail.com (moi)
Injection-Date: Mon, 19 Feb 2024 14:49:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2745
 by: moi - Mon, 19 Feb 2024 14:49 UTC

>>> from strings_for_humans import ReadAHumanString
>>> ReadAHumanString("abc")
'abc'
>>> ReadAHumanString("thirty - dreißig")
Traceback (most recent call last):
File "<coq last command>", line 1, in <module>
File "c:\humour\strings_for_humans.py", line 68, in ReadAHumanString
raise TypeError('invalid human string (2)')
TypeError: invalid human string (2)
>>> ReadAHumanString("thirty - drei\u00dfig")
Traceback (most recent call last):
File "<coq last command>", line 1, in <module>
File "c:\humour\strings_for_humans.py", line 68, in ReadAHumanString
raise TypeError('invalid human string (2)')
TypeError: invalid human string (2)
>>> ReadAHumanString("thirty - drei\U000000dfig")
Traceback (most recent call last):
File "<coq last command>", line 1, in <module>
File "c:\humour\strings_for_humans.py", line 68, in ReadAHumanString
raise TypeError('invalid human string (2)')
TypeError: invalid human string (2)
>>> # genious idea
>>> ReadAHumanString("thirty - 'dreißig'")
'thirty - dreißig'
>>> # generalization
>>> ReadAHumanString("'thirty - dreißig'")
'thirty - dreißig'
>>> ReadAHumanString("'thirty - drei\u00dfig'")
'thirty - dreißig'

Real software in February 2024.

I do not know if I should congratulate the creator(s) of such a stupidity
or those who are promoting it.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor