[Python-ideas] Re: Improve the textual representation of IPv4-mapped IPv6 addresses

2021-03-25 Thread Ronald Oussoren via Python-ideas
> 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

[Python-ideas] Re: Make fnmatch.filter accept a tuple of patterns

2021-03-25 Thread adelfino
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

[Python-ideas] Re: Make fnmatch.filter accept a tuple of patterns

2021-03-25 Thread Oleg Broytman
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

[Python-ideas] Re: Make fnmatch.filter accept a tuple of patterns

2021-03-25 Thread adelfino
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

[Python-ideas] Re: Make fnmatch.filter accept a tuple of patterns

2021-03-25 Thread Oleg Broytman
(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:

[Python-ideas] Re: Make fnmatch.filter accept a tuple of patterns

2021-03-25 Thread Oleg Broytman
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. > >

[Python-ideas] Re: Make fnmatch.filter accept a tuple of patterns

2021-03-25 Thread adelfino
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