Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

A modem is a baudy house.


devel / comp.lang.python / Re: How to test characters of a string

SubjectAuthor
o Re: How to test characters of a stringdn

1
Re: How to test characters of a string

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: PythonL...@DancesWithMice.info (dn)
Newsgroups: comp.lang.python
Subject: Re: How to test characters of a string
Date: Wed, 8 Jun 2022 10:32:38 +1200
Organization: DWM
Lines: 52
Message-ID: <mailman.564.1654641197.20749.python-list@python.org>
References: <CF24C0C6-7779-4F8C-B42C-C17A3E54982E@looktowindward.com>
<0266F855-0776-4A75-937B-E4AC79DF8D78@barrys-emacs.org>
<CAPTjJmpgDUgOJ9ym5789b_zSeX9oJvTo_18a-W5svAdtAKwrkQ@mail.gmail.com>
<Yp/HPhvhh+CYxizh@scrozzle>
<3e2369c4-9862-39c7-fd4f-63095f345466@DancesWithMice.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de BNFIKJSpdna4bbNAM8Ye1QDs/UH6XTpMOxbQN87k7MoA==
Return-Path: <PythonList@DancesWithMice.info>
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=danceswithmice.info header.i=@danceswithmice.info
header.b=p6kbiMhi; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.005
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'psf': 0.02; 'url:psf':
0.04; 'thread': 0.05; 'url-ip:104.196/16': 0.07; 'python.': 0.08;
':-)': 0.09; '=dn': 0.09; 'from:addr:danceswithmice.info': 0.09;
'from:addr:pythonlist': 0.09; 'intersection': 0.09; 'recognised':
0.09; 'responses': 0.09; 'subject:test': 0.09; 'tags': 0.09;
'(even': 0.16; '>>>>': 0.16; 'conclusion': 0.16; 'confused': 0.16;
'context.': 0.16; 'docs.': 0.16; 'hints': 0.16; 'id3': 0.16;
'message-id:@DancesWithMice.info': 0.16; 'objective': 0.16;
'post!': 0.16; 'question,': 0.16; 'received:51.254': 0.16;
'received:51.254.211': 0.16; 'received:51.254.211.219': 0.16;
'received:cloud': 0.16; 'received:rangi.cloud': 0.16;
'subject:characters': 0.16; 'subject:string': 0.16; 'problem':
0.16; 'python': 0.16; 'to:addr:python-list': 0.20; 'language':
0.21; "i've": 0.22; 'teach': 0.22; 'code': 0.23; 'subject:How':
0.23; 'student': 0.24; 'anything': 0.25; 'depends': 0.25; '>>>':
0.28; 'conduct': 0.28; 'header:User-Agent:1': 0.30; 'code,': 0.31;
'saved': 0.31; 'header:Organization:1': 0.31; 'question': 0.32;
'but': 0.32; 'particular': 0.33; 'same': 0.34; "didn't": 0.34;
'header:In-Reply-To:1': 0.34; 'question.': 0.35; 'url:)': 0.35;
'yes,': 0.35; 'files': 0.36; 'people': 0.36; 'received:192.168':
0.37; 'use': 0.39; 'files.': 0.40; 'try': 0.40; 'tell': 0.60;
'provide': 0.60; 'skip:h 10': 0.61; 'seen': 0.62; 'here': 0.62;
'follow': 0.62; 'great': 0.63; 'finished': 0.64; 'involve': 0.64;
'music': 0.64; 'received:51': 0.64; 'thus': 0.64; 'your': 0.64;
'tool': 0.65; 'look': 0.65; 'less': 0.65; 'received:userid': 0.66;
'interested': 0.68; 'writers': 0.69; 'interest': 0.70; 'knowing':
0.71; 'future': 0.72; 'head': 0.73; 'yourself': 0.75; 'future,':
0.76; 'need,': 0.76; 'left': 0.83; 'background,': 0.84; 'citing':
0.84; 'exercise': 0.84; 'revealed': 0.84; 'strings': 0.84; 'pop':
0.91; 'mind,': 0.93
DKIM-Filter: OpenDKIM Filter v2.11.0 vps.rangi.cloud A176C8EEE
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danceswithmice.info;
s=staff; t=1654641194;
bh=3mBH0szn4eohWJ5hrpCP9WrgMQH02HiBzOHc5RQDzUA=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=p6kbiMhiljbJM976e8Hyku6h7mCj3hmKMmV5PLu7L2wiumg+qTY+Yux2YiKn+uJXR
DclcSZhRkYjbZG5V7Cv2PwH6tj9lYdbFwx/Bt6wL3/fClrqfSluQDtp2wVxZhaYihn
TAQNe1lq0Lq82E3FvyJ5x71vjC3OxCBvJk5H5zFJ6LjJDxMhlhmXHbcd6Ka49K9pEG
eQ6HN3blg2xh8FYKiAHpR9LygbZXQSMFDgKBJ/vb7Q+otfOmgNIpQc5BZBIVM2G+ze
iTWQeQiAjo7KurtQlnoiapzXGAovBpXpIPNwTFy2XcZYr+9FjI07nxTNBo7gvUvpYF
BLiYzTDzetjvw==
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on vps517507.ovh.net
X-Spam-Level:
X-Spam-Status: No, score=-4.2 required=5.0 tests=ALL_TRUSTED,BAYES_00,
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,T_SCC_BODY_TEXT_LINE
autolearn=ham autolearn_force=no version=3.4.0
DKIM-Filter: OpenDKIM Filter v2.11.0 vps.rangi.cloud 4BF7D8ED8
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danceswithmice.info;
s=staff; t=1654641178;
bh=3mBH0szn4eohWJ5hrpCP9WrgMQH02HiBzOHc5RQDzUA=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=fIbARyrdIUaCQ4QQNEXtjGkdScr9KJecNThDkG7W6k2IYGLlh8wlaraxP/XNZi43B
2CcWbH+W6z2duIwe619j8+fj3cEylpR+97udTpsfC6EyjdypBkgwPTo3dZo3vvQXKq
e9hxMXtkpFchdmEOMm59iPGOj9cFu26JXKk77KfWbwcyGkq+5Uh775TXRKXwifXwN1
hUtyiGSl9RBMSQQ50nJw4PblqZo4gbVeK8EfswKpcW0puK/REiMa7KQ0pMLfCuayeA
bY3xMpQgmgjDoQQFSBYDMlKKtP8HGGtdpStYuJ/FZsoWAjN4zlLMrF7a6WxxA8qASY
rF74NtDpI0jQw==
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Content-Language: en-GB
In-Reply-To: <Yp/HPhvhh+CYxizh@scrozzle>
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: <3e2369c4-9862-39c7-fd4f-63095f345466@DancesWithMice.info>
X-Mailman-Original-References: <CF24C0C6-7779-4F8C-B42C-C17A3E54982E@looktowindward.com>
<0266F855-0776-4A75-937B-E4AC79DF8D78@barrys-emacs.org>
<CAPTjJmpgDUgOJ9ym5789b_zSeX9oJvTo_18a-W5svAdtAKwrkQ@mail.gmail.com>
<Yp/HPhvhh+CYxizh@scrozzle>
 by: dn - Tue, 7 Jun 2022 22:32 UTC

>>>> It depends on the language I’m using, in Objective C, I’d use isNumeric, just wanted to know what the equivalent is in Python.
>>>>
>>>> If you know the answer why don’t you just tell me and if you don’t, don’t post!
>>>
>>> People ask home work questions here and we try to teach a student with hints not finished answers.
>>> Your post was confused with a home work question.
>>
>> In the future, to make it look less like a homework question, show
>> your current code, which would provide context. Last I checked,
>> homework questions don't usually involve ID3 tags in MP3 files :)

Ah, so that's where I've seen it before!
(thanks for scratching my head @Chris - but watch-out for splinters!)

Yes, the problem has been used as a training exercise, eg same song but
in different albums/play-lists, different capitalisation, and such-like;
ie 'data cleaning' and harmonisation - good for use at the intersection
of Python and SQL (or NoSQL).

Knowing the background, and thus the particular need, would have saved a
lot of time - giving the answer as code (per one of the contributions)
would have taken considerably less effort than looking-up and citing the
docs.

Perhaps then, the 'learning-opportunity' is that when such questions pop
into one's mind, 'the docs' is *the* recommended first-call?

> The original question in this thread didn't say anything about MP3
> files. Jumping to that conclusion from strings like '05 Trinket' was
> left as an exercise for the interested reader. :-)

This reader's interest was to figure-out why "trinket" didn't refer to
some small decoration or 'bling', nor to a Python training tool
(https://trinket.io/), but to a music group/video series.
(even more-surprising: that this grey-beard recognised one of their tracks).

On the other side of the relationship, writers are expected to follow
the PSF Code of Conduct (https://www.python.org/psf/conduct/), eg
respect, acknowledgement, grace...

Such also encourages (positive) responses when asking future questions...

Now that you (@Dave) have revealed yourself as more than a raw-beginner,
and to have skills transferable to the Python world, it'll be great to
see you 'here', contributing to others' posts...
--
Regards,
=dn

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor