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