A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-April/034440.html below:

[Python-Dev] _socket efficiencies ideas

[Python-Dev] _socket efficiencies ideasSean Reifschneider jafo@tummy.com
Wed, 9 Apr 2003 14:33:19 -0600
On Wed, Apr 09, 2003 at 01:44:51PM -0500, Skip Montanaro wrote:
>Can a top-level domain be all digits?  If not, why not assume numeric if
>re.search(r"\.\d+$", addr) is not None?

I don't think anyone sane would create a top-level that's digits,
particularly in the range of 0 to 255.  That probably means that
somebody is going to do it...  ;-/

I think checking for 2 to 4 dotted octets in the range of 0 to 255
would be safest...  Yes, you can probably get away with using the regex
above, but I wouldn't want to.

Sean
-- 
 Sucking all the marrow out of life doesn't mean choking on the bone.
                 -- _Dead_Poet's_Society_
Sean Reifschneider, Inimitably Superfluous <jafo@tummy.com>
tummy.com, ltd. - Linux Consulting since 1995.  Qmail, Python, SysAdmin



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4