[Python-ideas] Re: PEP8 mandatory-is rule

2021-08-31 Thread Michael Lee
Another idea -- have you considered deferring teaching students about None until after they've had a chance to learn about writing custom objects and operator overloading? None is primarily useful for representing the absence of some value, and I'm not sure if that's something beginners actually n

Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-06 Thread Michael Lee
actually really exist while being more broadly useful. Or I guess we could just remove that restriction: "it feels too magical" isn't a great objection on my part. Either way, that part of the PEP could use some more refinement, I think. -- Michael On Wed, Mar 6, 2019 at

Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-06 Thread Michael Lee
> > I strongly agree with Ka-Ping. '+' is intuitively concatenation not > merging. The behavior is overwhelmingly more similar to the '|' operator in > sets (whether or not a user happens to know the historical implementation > overlap). I think the behavior proposed in the PEP makes sense whethe

Re: [Python-ideas] Pre-conditions and post-conditions

2018-09-15 Thread Michael Lee
I just want to point out that you don't need permission from anybody to start a library. I think developing and popularizing a contracts library is a reasonable goal -- but that's something you can start doing at any time without waiting for consensus. And if it gets popular enough, maybe it'll be

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-19 Thread Michael Lee
Hi -- I'm a new voice here, though I've been lurking for a while now. How do people feel about removing "??=" and "foo?[bar]" from the PEP and sticking with just "foo?.bar" and "foo ?? bar"? Reasons for not implementing "??=": 1. I think the other operators are useful in that they can be chai