Hi Paul
We wrote
>> I'd like to take this to bugs.python.org, if only to provide another
>> route to discovering this (very useful) conversation.
>
> That's perfectly OK, and entirely your choice. However, if you do so,
> I'd hope that you present the dissenting views from this list when you
> ra
On Thu, 16 Aug 2018 at 15:28, Jonathan Fine wrote:
> I'd like to take this to bugs.python.org, if only to provide another
> route to discovering this (very useful) conversation.
That's perfectly OK, and entirely your choice. However, if you do so,
I'd hope that you present the dissenting views fr
On 16/08/18 14:41, Jonathan Fine wrote:
Hi Rhodri
Thank you for your message. You wrote:
I disagree. That original text looks like it has been very carefully
written to be (almost) true. What you are proposing to replace it with is
less true and confusing to boot.
The decision is neither yo
Hi Paul
Thank you for your comments. I think different people experience
things in different ways, based on who they are. What their
background, training, experience are. One person's precision is
another's pedantry.
An aside. Babbage and Tennyson: https://www.uh.edu/engines/epi879.htm
You wrote
On Thu, 16 Aug 2018 at 14:26, Rhodri James wrote:
>
> On 16/08/18 14:04, Jonathan Fine wrote:
> > And I think there's more. The page says
> >> None
> >> This type has a single value. There is a single object with this value.
> >> [...]
> > I think it better to write
> >> NoneType
> >> This type h
Hi Rhodri
Thank you for your message. You wrote:
> I disagree. That original text looks like it has been very carefully
> written to be (almost) true. What you are proposing to replace it with is
> less true and confusing to boot.
The decision is neither your's nor mine. It is for the Python d
On 16/08/18 14:04, Jonathan Fine wrote:
And I think there's more. The page says
None
This type has a single value. There is a single object with this value. [...]
I think it better to write
NoneType
This type has a single value, `None`. The keyword `None` always gives the value
`None`.
I di
Hi Neil
Thank you for your post, regarding
https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy.
You've suggested changing "built-in name None" to "keyword None". I
think that's a good change. And similar changes might be welcome
elsewhere in the docs, perhaps also for T
Is None a builtin?
In [1]: from keyword import kwlist
In [3]: 'Ellipsis' in kwlist
Out[3]: False
In [4]: 'None' in kwlist
Out[4]: True
Maybe we should change
This type has a single value. There is a single object with this value.
This object is accessed through the built-in name None. It is us
On 15/08/18 19:55, Jonathan Fine wrote:
Rhodri says my version, exaggerated for effect, reads like
Sometimes a value is required. But (pay careful attention
to this, it's important and there will be a quiz later)
we're not able to provide one.
Yes, Rhodri, you've understood what I'm doing. I d
Hi
Thank you all, for the kind words and appreciation, and the comments
and suggestions. I have time now to respond to one comment. Please
note that is just my opinion, and your opinion may be different.
Rhodri James prefers
(https://mail.python.org/pipermail/python-ideas/2018-August/052742.html)
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
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
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 say
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, Steve
On Fri, Jul 27, 2018 at 9:20 AM, Michael Selik wrote:
> On Mon, Jul 23, 2018 at 2:03 AM Jonathan Fine wrote:
>>
>> Thank you for your attention. What have I missed?
>
>
> None and a few other things are special-cased by CPython. The compiler won't
> bother to write bytecode instructions when an i
On Mon, Jul 23, 2018 at 2:03 AM Jonathan Fine wrote:
> Thank you for your attention. What have I missed?
>
None and a few other things are special-cased by CPython. The compiler
won't bother to write bytecode instructions when an if-statement obviously
evaluates false. That might surprise some f
Here's another way that None is special.
===
>>> NoneType = type(None)
>>>
>>> class myNoneType(NoneType): pass
...
Traceback (most recent call last):
File "", line 1, in
TypeError: type 'NoneType' is not an acceptable base type
===
For more information see
https://stackoverflow.com/questions/1
On Jul 23, 2018 8:43 PM, "Chris Barker - NOAA Federal via Python-ideas" <
python-ideas@python.org> wrote:
> Procedures return None
> ==
a = [3,1,2]
b = a.sort()
a, b
> ([1, 2, 3], None)
This is less about None than about the convention that mutating
methods return
I agree that some more docs on the specialness of None (and, to a
lessor extent, True and False).
A few comments:
> None is a keyword
> ==
None = 0
> SyntaxError: can't assign to keyword
One of the implications of this is that “None” will always be the
Singleton None object — so
>lot. Actually, the ?. and ?[
> operators seem like they'd be much more useful if I did more JSON
> processing -
This has been mentioned a lot in this discussion—
Maybe what we need is a smarter JSON processing package, rather than
new operators.
Granted, these operators would help the authors o
On Mon, Jul 23, 2018 at 10:03:10 +0100, Jonathan Fine wrote:
> I thought, a page on how None is special would be nice.
> I've not found such a page on the web. We do have
> ===
> https://docs.python.org/3/library/constants.html
Hi,
there's also
https://docs.python.org/3/reference/datamodel.html#t
I think your description of the uses of None is really great. There's
definitely no reason it cannot be a blog post immediately, but perhaps at
some later point included in The Python Tutorial.
On Mon, Jul 23, 2018 at 8:39 AM Jonathan Fine wrote:
> Hi Steve
>
> You wrote
>
> > I think your docu
Hi Steve
You wrote
> I think your document would be a great blog post. I don't think it is
> very helpful as part of the standard documention, as it is more a
> collection of arbitrary facts about None than a coherent "big picture"
> document.
Thank you. That's nice. However, I think there is, o
Hi Steve
In this thread you wrote, replying to Paul Moore's comments on PEP 505
> None is already a special value. It is so special, it is one of only
> three built-in values given keyword status. All the other built-ins,
> including such things that are used implicitly by the interpreter (such
>
On Mon, Jul 23, 2018 at 10:03:10AM +0100, Jonathan Fine wrote:
> I thought, a page on how None is special would be nice.
I think your document would be a great blog post. I don't think it is
very helpful as part of the standard documention, as it is more a
collection of arbitrary facts about No
On Mon, Jul 23, 2018 at 12:15:14PM +0100, Paul Moore wrote:
> The examples are interesting, agreed. One thing they highlight to me
> is that most uses of None are effectively convention. The only two
> behaviours that are unique to None and implemented in the interpreter
> are:
>
> 1. Functions t
On 23 July 2018 at 12:24, Jonathan Fine wrote:
> You also wrote:
>> One of the key points about this proposal [PEP 505]
>
> My goal in this thread is to document clearly and develop a clear
> shared understanding of the ways in which None is special in Python.
> Please, please, please can we not d
Hi Paul
Thank you for your contribution
> The examples are interesting, agreed. One thing they highlight to me
> is that most uses of None are effectively convention. The only two
> behaviours that are unique to None and implemented in the interpreter
> are:
>
> 1. Functions that don't return an
On 23 July 2018 at 10:16, Steve Dower wrote:
> On 23Jul2018 1003, Jonathan Fine wrote:
>>
>> This arises out of PEP 505 - None-aware operators.
>>
>> I thought, a page on how None is special would be nice.
>> I've not found such a page on the web. We do have
>> ===
>> https://docs.python.org/3/lib
On 23Jul2018 1003, Jonathan Fine wrote:
This arises out of PEP 505 - None-aware operators.
I thought, a page on how None is special would be nice.
I've not found such a page on the web. We do have
===
https://docs.python.org/3/library/constants.html
None
The sole value of the type NoneType. None
This arises out of PEP 505 - None-aware operators.
I thought, a page on how None is special would be nice.
I've not found such a page on the web. We do have
===
https://docs.python.org/3/library/constants.html
None
The sole value of the type NoneType. None is
frequently used to represent the absen
32 matches
Mail list logo