Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27172
| From | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| Subject | Re: type(None)() |
| Date | 2012-08-16 17:44 +0200 |
| References | <502cebf4$0$6905$e4fe514c@news2.news.xs4all.nl> <502cfc78$0$29978$c3e8da3$5496439d@news.astraweb.com> <k0j3o5$t12$1@ger.gmane.org> <CAExgZOjXknLpRc+Mm8upWUO1VL1bO4umPrBdtXCJtCCe=Zz0uQ@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3373.1345131902.4697.python-list@python.org> (permalink) |
Ramchandra Apte, 16.08.2012 17:39: > On 16 August 2012 21:01, Stefan Behnel wrote: >> Steven D'Aprano, 16.08.2012 15:58: >>>>> NoneType raises an error if you try to create a second instance. >>> In my opinion, this is a PITA for None and better behaviour would be to >>> return the pre-existing NoneType instance, but I didn't design the >>> language. >> >> The time machine strikes again. >> >> Python 3.3.0b1 (default:f7b59e890e30, Aug 11 2012, 05:30:10) >> [GCC 4.6.3] on linux >> Type "help", "copyright", "credits" or "license" for more information. >>>>> type(None)() >>>>> print(type(None)()) >> None > > Are they the same object Obviously. None is a singleton (as was already mentioned a couple of times in this thread). Stefan
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
type(None)() Hans Mulder <hansmu@xs4all.nl> - 2012-08-16 14:47 +0200
Re: type(None)() Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-16 14:54 +0200
Re: type(None)() Chris Angelico <rosuav@gmail.com> - 2012-08-16 23:37 +1000
Re: type(None)() Ian Kelly <ian.g.kelly@gmail.com> - 2012-08-16 07:56 -0600
Re: type(None)() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-16 13:58 +0000
Re: type(None)() Stefan Behnel <stefan_ml@behnel.de> - 2012-08-16 17:31 +0200
Re: type(None)() Stefan Behnel <stefan_ml@behnel.de> - 2012-08-16 17:44 +0200
Re: type(None)() Ethan Furman <ethan@stoneleaf.us> - 2012-08-16 09:06 -0700
Re: type(None)() Robert Kern <robert.kern@gmail.com> - 2012-08-16 15:56 +0100
Re: type(None)() MRAB <python@mrabarnett.plus.com> - 2012-08-16 16:13 +0100
Re: type(None)() Ethan Furman <ethan@stoneleaf.us> - 2012-08-16 09:07 -0700
csiph-web