RE: Module urljoin does not appear to work with scheme Gemini

2025-04-24 Thread Anders Munch via Python-list
Henry S. Thompson wrote: > Some approach to support future-proofing in general would seem to be in > order. > Given some other precedents, adding a boolean argument called either 'strict' > or 'lax' would be my preference. An alternative would be to refactor urllib.parse to use strategy objects

RE: super().__init__() and bytes

2024-12-03 Thread Anders Munch via Python-list
Roel Schroeven wrote: > As a follow-up, it looks like this behavior is because bytes and int are > immutable. Yes. > But that doesn't tell me why using super().__init__() > doesn't work for immutable classes. bytes.__init__ does work, but it's just an inherited object.__init__, which does no

Re: Configuring an object via a dictionary

2024-03-18 Thread Anders Munch via Python-list
dn wrote: >Loris Bennett wrote: >> However, with a view to asking forgiveness rather than >> permission, is there some simple way just to assign the dictionary >> elements which do in fact exist to self-variables? > >Assuming config is a dict: > > self.__dict__.update( config ) Here's anothe

Re: Sorting NaNs

2018-06-11 Thread Anders Munch
Steven D'Aprano: It is not a guess if the user explicitly specifies that as the behaviour. If that was the context, sure, no problem. - Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: Sorting NaNs

2018-06-10 Thread Anders Munch
Richard Damon wrote: The two behaviors that I have heard suggested are: 1) If any of the inputs are a NaN, the median should be a NaN. (Propagating the NaN as indicator of a numeric error) 2) Remove the NaNs from the input set and process what is left. If nothing, then return a NaN (treating N