Deutsch English Français Italiano |
<vaoaak$3l470$3@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Python (was Re: I did not inhale) Date: Wed, 28 Aug 2024 23:02:45 -0000 (UTC) Organization: A noiseless patient Spider Lines: 70 Message-ID: <vaoaak$3l470$3@dont-email.me> References: <uu54la$3su5b$6@dont-email.me> <va44rh$3p1l6$1@dont-email.me> <va45eq$3pkt9$1@dont-email.me> <va4aut$3q4g0$1@dont-email.me> <va4fbr$3qvij$1@dont-email.me> <va5108$3tmmd$1@dont-email.me> <va51ok$3tqr9$1@dont-email.me> <va5ec2$3vluh$1@dont-email.me> <va6q4g$c1a7$1@dont-email.me> <va6rpa$c6bg$1@dont-email.me> <va6se9$cb8e$1@dont-email.me> <20240826083330.00004760@gmail.com> <vaises$2k7o6$2@dont-email.me> <20240826155113.000005ba@gmail.com> <wwvo75eicla.fsf@LkoBDZeT.terraraq.uk> <vak9k9$2ujrs$1@dont-email.me> <valgpu$34s18$1@dont-email.me> <87y14hd4bk.fsf@nosuchdomain.example.com> <valnei$35rt8$2@dont-email.me> <87ikvlcs7i.fsf@nosuchdomain.example.com> <vamclm$3c4ke$1@dont-email.me> <87ttf4bdcx.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 29 Aug 2024 01:02:45 +0200 (CEST) Injection-Info: dont-email.me; posting-host="a3e0b73fdd7ebf903f98fecca6ec3d09"; logging-data="3838176"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Ov4qXDy+i6GsxKmB8rF5g" User-Agent: Pan/0.160 (Toresk; ) Cancel-Lock: sha1:ecTSqxIPxdsBKnPGFbyUohkDirc= Bytes: 4501 On Wed, 28 Aug 2024 13:29:18 -0700, Keith Thompson wrote: > But ok, I found your post and removed all the #end comments. I found it > just as readable without them as with them. You know what? You are right. That example was just too well-structured. Here’s a more dangerous one: def register_additional_standard(self, **kwargs) : "registers additional standard interfaces that are not automatically" \ " installed at Connection creation time. Currently the only one is" \ " the object-manager interface, registered with\n" \ "\n" \ " «conn».register_additional_standard(managed_objects = True)\n" for key in kwargs : if kwargs[key] : if key == "managed_objects" : if self._managed_objects != None : raise asyncio.InvalidStateError \ ( "object manager interface already registered" ) #end if self.register \ ( path = "/", interface = ManagedObjectsHandler(), fallback = True ) self._managed_objects = {} else : raise TypeError("unrecognized argument keyword “%s”" % key) #end if #end if #end for return \ self #end register_additional_standard versus def register_additional_standard(self, **kwargs) : "registers additional standard interfaces that are not automatically" \ " installed at Connection creation time. Currently the only one is" \ " the object-manager interface, registered with\n" \ "\n" \ " «conn».register_additional_standard(managed_objects = True)\n" for key in kwargs : if kwargs[key] : if key == "managed_objects" : if self._managed_objects != None : raise asyncio.InvalidStateError \ ( "object manager interface already registered" ) self.register \ ( path = "/", interface = ManagedObjectsHandler(), fallback = True ) self._managed_objects = {} else : raise TypeError("unrecognized argument keyword “%s”" % key) return self I was looking for quite a tricky example I remember seeing on the ArjanCodes channel on YouTube, but I can’t find it.