Re: [Python-ideas] Python docs page: In what ways is None special

2018-08-14 Thread David Mertz
Great work! There are a few typos, I'll try to get to a PR on those. I wonder if it's worth noting that None is a singleton, while 42 is just a value. I.e. there might be several distinct objects that happen to be the int 42, but not so with None. Of course, in CPython, small integers are cached

Re: [Python-ideas] Python docs page: In what ways is None special

2018-08-14 Thread Brice Parent
Nice work, very usefull. Is it interesting enough to note that the negation of None is True? (probably just because when it's casted to bool, it becomes False). Also,  even if None is seen as the value for the lack of value, it is still hashable and can be used as a key to a dict (I'm not

Re: [Python-ideas] Python docs: page: In what ways in None special

2018-08-14 Thread Rhodri James
(Sorry to break threading on this. In a fit of idiocy I deleted the original email before realising I wanted to reply.) First off, thanks for doing this Jonathan. Documentation is usually a thankless task, so we ought to start by thanking you! I have a few comments on both content and

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-14 Thread Michael Selik
The conversation about syntactic sugar for ``functools.partial`` led to a question about whether jargon like "lambda" makes the concept of an anonymous function more difficult to learn. In my own experience teaching, I find that many concepts are easier to introduce if I avoid the Python jargon

Re: [Python-ideas] Toxic forum

2018-08-14 Thread Jacco van Dorp
I'm perhaps the newest and most ignorant subscriber here - I daresay everyone here has superior python knowledge to me, and all my other computing knowledge is inferior to what I can do with python. (and so far, I've had no influence at all on python) However, this mailing list, generally, does

Re: [Python-ideas] Python docs page: In what ways is None special

2018-08-14 Thread Jonathan Fine
Hi I'm pleased to announce that I've completed the first draft of my page. It's viewable on gitub. https://github.com/jfine2358/py-jfine2358/blob/master/docs/none-is-special.md To quote from that page: This page arose from a thread on the python-ideas list. I thank Steve Dower, Paul Moore,

Re: [Python-ideas] Syntactic sugar to declare partial functions

2018-08-14 Thread Steven D'Aprano
On Mon, Aug 13, 2018 at 07:46:49PM +0200, Stefan Behnel wrote: > Michel Desmoulin schrieb am 09.08.2018 um 18:59: > > I'd rather have functools.partial() to be added as a new method on > > function objects. [...] > > add_2 = add.partial(2) > > Except that this only works for functions, not for

Re: [Python-ideas] Python docs: page: In what ways in None special

2018-08-14 Thread Chris Barker via Python-ideas
On Tue, Aug 14, 2018 at 10:45 AM, Rhodri James wrote: > On 'None is a constant': > > Erm. I think you've got carried away with simplifying this and gone down > a blind alley. None is a literal, and like any other literal can't be > rebound. no, it's not -- None is keyword, and just like any

Re: [Python-ideas] Python docs: page: In what ways in None special

2018-08-14 Thread Chris Angelico
On Wed, Aug 15, 2018 at 9:09 AM, Chris Barker via Python-ideas wrote: > no, it's not -- None is keyword, and just like any other keyword, it can't > be re-bound. However, every other keyword I tried to rebind results in a > generic: > > SyntaxError: invalid syntax > > (except None, True, and

Re: [Python-ideas] Python docs page: In what ways is None special

2018-08-14 Thread Chris Barker via Python-ideas
On Tue, Aug 14, 2018 at 10:25 AM, David Mertz wrote: > Great work! There are a few typos, I'll try to get to a PR on those. > > I wonder if it's worth noting that None is a singleton, while 42 is just a > value. I.e. there might be several distinct objects that happen to be the > int 42, but not

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-14 Thread Steve Barnes
On 14/08/2018 20:42, Michael Selik wrote: > > Good comparisons can be found in other fields: > * Driving -- brakes vs stoppers > * Sailing -- starboard vs right-side > * Medicine -- postprandial vs after-meal > * Biology -- dinosaur vs direlizard > While NOT wanting to start another fight I

Re: [Python-ideas] Conduct on python-ideas

2018-08-14 Thread Jonathan Fine
Hi Everyone Brett Cannon wrote: > I shouldn't be having to explain to adults on how to communicate among > strangers of different cultures, but here we are. I did an entire PyCon US > keynote on why we need to treat open source as a series of kindnesses and > react as such:

Re: [Python-ideas] Syntactic sugar to declare partial functions

2018-08-14 Thread Chris Barker - NOAA Federal via Python-ideas
> > Do we often call functools.partial on arbitrary callable objects that we > don't know in advance? For my part, I don’t think I’ve ever used partial in production code. It just seems easier to simply fo it by hand with a closure ( Am I using that term right? I still don’t quite get the