> On 18 Mar 2021, at 11:07, Maxime Mouchet wrote:
>
> Hi,
>
> Python supports IPv4-mapped IPv6 addresses as defined by RFC 4038:
> "the IPv6 address :::x.y.z.w represents the IPv4 address x.y.z.w.”
>
> The current behavior is as follows:
>
>from ipaddress import ip_address
>addr
Several attempts in this thread to write "simpler" code that does this job
proved to be buggy. I feel there's some ground to say that having this in the
library could prevent other less talented writers make those or even bigger
mistakes.
I feel a tuple to specify multiple patterns fits nicely
On Wed, Mar 24, 2021 at 10:35:59PM -, adelf...@gmail.com wrote:
> Several attempts in this thread to write "simpler" code that does this job
> proved to be buggy. I feel there's some ground to say that having this in the
> library could prevent other less talented writers make those or even b
This follows the example of str.startswith/str.endswith, but yes, it could be
any iterable.
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/pyth
(If the answer is for me - pity it lacks any context.)
On Thu, Mar 25, 2021 at 10:51:06PM -, adelf...@gmail.com wrote:
> This follows the example of str.startswith/str.endswith, but yes, it could be
> any iterable.
It could but currently cannot. The code checks for ``tuple`` literally:
On Fri, Mar 26, 2021 at 12:30:25AM +0100, Oleg Broytman wrote:
> (If the answer is for me - pity it lacks any context.)
>
> On Thu, Mar 25, 2021 at 10:51:06PM -, adelf...@gmail.com wrote:
> > This follows the example of str.startswith/str.endswith, but yes, it could
> > be any iterable.
>
>
Oleg Broytman wrote:
> (If the answer is for me - pity it lacks any context.)
> On Thu, Mar 25, 2021 at 10:51:06PM -, adelf...@gmail.com wrote:
> > This follows the example of str.startswith/str.endswith, but yes, it could
> > be any iterable.
> > It could but currently cannot. The code checks