Chris Angelico <ros...@gmail.com>: > On Mon, Oct 5, 2015 at 10:42 PM, Marko Rauhamaa <ma...@pacujo.net> wrote: >> Why not use a fricking class framework: >> >> Then, we could simply have: >> >> if Range(IncludedEndpoint(0), IncludedEndpoint(10)).outside(x): >> print("x has wrong value") >> else: >> print("x has good value") >> >> Just for the sake of readability, I mean... > > Hold on a moment! You can't seriously be contemplating instantiating > those classes directly, can you?!? You need to go through the > ThreadedRangeFactory, passing it a couple of EndpointFactory > subclasses to suggest which kinds of endpoints to employ, and finally > use operator overloading to wait for the factory thread to finish its > work. *THEN* you can use this Range object. > > ChrisA > has just been reading http://thedailywtf.com/articles/eins-zwei-zuffa
Pointing out flaws in my code is totally unprofessional. Marko -- https://mail.python.org/mailman/listinfo/python-list