On 03/25/2016 06:03 AM, Albert-Jan Roskam wrote:
> Somebody wrote:
>> Somebody else wrote:
I know Python does not have variables, but names.
Multiple names cant then be bound to the same objects.
So this behavior
--> b = 234
--> v = 234
--> b is v
True
according to the above that is ok
But
On Sat, Mar 26, 2016 at 12:03 AM, Albert-Jan Roskam
wrote:
>> You should not bother with object identity for objects other than None.
>
>
> A little late to the party, but: how about Ellipsis? Shouldn't "is" also be
> used for that one? (It's rare, I know :))
Yes, and also True and False, if you
> To: python-list@python.org
> From: __pete...@web.de
> Subject: Effects of caching frequently used objects, was Re: Explaining
> names vs variables in Python
> Date: Wed, 2 Mar 2016 10:12:48 +0100
>
> Salvatore DI DIO wrote:
>
> > Hello,
> >
> >
On Thu, Mar 3, 2016 at 10:03 AM, Rustom Mody wrote:
> Is it so damn hard to be a bit honest and when asked about is in python to
> reply:
>
> If you dont know what you are doing, dont use 'is' (None excepted)
> If you know why are you asking?
That seems like a rather unhelpful response.
--
http
On Thursday, March 3, 2016 at 7:22:43 AM UTC+5:30, Steven D'Aprano wrote:
> On Thu, 3 Mar 2016 05:12 am, Marko Rauhamaa wrote:
>
> > Steven D'Aprano :
> >
> >> In this case, "same object" carries the normal English meaning of
> >> "same" and the normal computer science meaning of "object" in the
On 03/03/2016 02:05, Steven D'Aprano wrote:
On Thu, 3 Mar 2016 08:49 am, Mark Lawrence wrote:
On 02/03/2016 17:23, Steven D'Aprano wrote:
On Thu, 3 Mar 2016 01:11 am, Marko Rauhamaa wrote:
What is missing is the rules that are obeyed by the "is" operator.
I think what is actually missing i
On Thu, 3 Mar 2016 08:49 am, Mark Lawrence wrote:
> On 02/03/2016 17:23, Steven D'Aprano wrote:
>> On Thu, 3 Mar 2016 01:11 am, Marko Rauhamaa wrote:
>>
>>> What is missing is the rules that are obeyed by the "is" operator.
>>
>> I think what is actually missing is some common bloody sense. The Py
On Thu, 3 Mar 2016 05:12 am, Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> In this case, "same object" carries the normal English meaning of
>> "same" and the normal computer science meaning of "object" in the
>> sense of "Object Oriented Programming". There's no mystery here, no
>> circular def
On Thursday, March 3, 2016 at 3:22:42 AM UTC+5:30, Chris Angelico wrote:
> On Thu, Mar 3, 2016 at 8:49 AM, Mark Lawrence wrote:
> > Are we discussing UK (highly generalised), Geordie, Glaswegian, US,
> > Canadian, South African, Australian, New Zealand, or some other form of
> > English?
>
> Is t
On 02/03/2016 21:52, Chris Angelico wrote:
On Thu, Mar 3, 2016 at 8:49 AM, Mark Lawrence wrote:
Are we discussing UK (highly generalised), Geordie, Glaswegian, US,
Canadian, South African, Australian, New Zealand, or some other form of
English?
Is there any disagreement among them about the w
On Thu, Mar 3, 2016 at 8:49 AM, Mark Lawrence wrote:
> Are we discussing UK (highly generalised), Geordie, Glaswegian, US,
> Canadian, South African, Australian, New Zealand, or some other form of
> English?
Is there any disagreement among them about the word "same"?
ChrisA
--
https://mail.pyth
On 02/03/2016 17:23, Steven D'Aprano wrote:
On Thu, 3 Mar 2016 01:11 am, Marko Rauhamaa wrote:
What is missing is the rules that are obeyed by the "is" operator.
I think what is actually missing is some common bloody sense. The Python
docs are written in English, and don't define *hundreds*,
Steven D'Aprano :
> In this case, "same object" carries the normal English meaning of
> "same" and the normal computer science meaning of "object" in the
> sense of "Object Oriented Programming". There's no mystery here, no
> circular definition.
I see three possible ways of defining "is" / objec
Salvatore DI DIO writes:
> I know Python does not have variables, but names.
In addition to the other food answers in this thread, you will want to
watch http://nedbatchelder.com/text/names.html> Ned Batchelder's
presentation on “Facts and myths about Python names and values”.
--
\“Me
On Wednesday, March 2, 2016 at 10:53:40 PM UTC+5:30, Steven D'Aprano wrote:
> On Thu, 3 Mar 2016 01:11 am, Marko Rauhamaa wrote:
>
> > What is missing is the rules that are obeyed by the "is" operator.
>
> I think what is actually missing is some common bloody sense. The Python
> docs are written
On Thu, 3 Mar 2016 01:11 am, Marko Rauhamaa wrote:
> What is missing is the rules that are obeyed by the "is" operator.
I think what is actually missing is some common bloody sense. The Python
docs are written in English, and don't define *hundreds*, possible
*thousands* of words because they are
On Thu, 3 Mar 2016 12:48 am, Chris Angelico wrote:
> On Thu, Mar 3, 2016 at 12:39 AM, Marko Rauhamaa wrote:
>> Chris Angelico :
>>
>>> Python defines that every object has an identity, which can be
>>> represented as an integer. Since this is an intrinsic part of the
>>> object, no two distinct o
Ian Kelly writes:
> On Wed, Mar 2, 2016 at 2:35 AM, Jussi Piitulainen wrote:
>> The following are too delicate for me. I suppose the answers could have
>> been different, but I can't guess what mechanism actually leads to these
>> results. Just idle curiosity on my part.
>>
> 890 is 890
>> Tru
On Wed, Mar 2, 2016 at 2:35 AM, Jussi Piitulainen
wrote:
> The following are too delicate for me. I suppose the answers could have
> been different, but I can't guess what mechanism actually leads to these
> results. Just idle curiosity on my part.
>
890 is 890
> True
id(890) == id(890)
On Wednesday, March 2, 2016 at 7:42:09 PM UTC+5:30, Marko Rauhamaa wrote:
> Chris Angelico :
>
> > On Thu, Mar 3, 2016 at 12:39 AM, Marko Rauhamaa wrote:
> >> Chris Angelico :
> >>
> >>> Python defines that every object has an identity, which can be
> >>> represented as an integer. Since this is
Chris Angelico :
> On Thu, Mar 3, 2016 at 12:39 AM, Marko Rauhamaa wrote:
>> Chris Angelico :
>>
>>> Python defines that every object has an identity, which can be
>>> represented as an integer. Since this is an intrinsic part of the
>>> object, no two distinct objects can truly have identical
>>
On Thu, Mar 3, 2016 at 12:39 AM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Python defines that every object has an identity, which can be
>> represented as an integer. Since this is an intrinsic part of the
>> object, no two distinct objects can truly have identical
>> characteristics. Python'
Chris Angelico :
> Python defines that every object has an identity, which can be
> represented as an integer. Since this is an intrinsic part of the
> object, no two distinct objects can truly have identical
> characteristics. Python's objects are like rifles - there are many
> like it, but this
Chris Angelico writes:
> Python defines that every object has an identity, which can be
> represented as an integer. Since this is an intrinsic part of the
> object, no two distinct objects can truly have identical
> characteristics. Python's objects are like rifles - there are many
> like it, bu
On Wed, Mar 2, 2016 at 11:34 PM, Marko Rauhamaa wrote:
> The ontological question is, can two *distinct* objects with *identical*
> characteristics exist?
>
> The fermionic answer is, no.
>
> The bosonic answer is, sure.
>
> Set theory has fermionic ontology (it's called extensionality).
>
> Pytho
Steven D'Aprano :
> On Wed, 2 Mar 2016 08:03 pm, Jesper K Brogaard wrote:
>
>> As I understand it, when you use 'is', you are comparing addresses to
>> objects, not the values contained in the objects. Use '==' instead.
>
> You should not think about addresses, because the location of objects
> is
Thank you very much ast and all of you.
I better understant now
Regards
--
https://mail.python.org/mailman/listinfo/python-list
"Salvatore DI DIO" a écrit dans le message de
news:a894d5ed-d906-4ff7-a537-32bf0187e...@googlegroups.com...
It is a little difficult to explain this behavior to a newcommer in Python
Can someone give me the right argument to expose ?
It is explained with many details here:
http://blog.ler
Thank you very much all of you.
I better understand now
Regards
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 2 Mar 2016 08:03 pm, Jesper K Brogaard wrote:
> As I understand it, when you use 'is', you are comparing addresses to
> objects, not the values contained in the objects. Use '==' instead.
You should not think about addresses, because the location of objects is not
part of the language. It
On Wed, 2 Mar 2016 07:32 pm, Salvatore DI DIO wrote:
> Hello,
>
> I know Python does not have variables, but names.
> Multiple names cant then be bound to the same objects.
Multiple names CAN be bound to the same object:
py> x = y = []
py> x is y
True
py> z = x
py> y.append("Hello world!")
py>
Salvatore DI DIO writes:
[- -]
> But where is the consistency ? if I try :
>
v = 890
w = 890
v is w
> False
I think it goes as follows.
Python keeps a cached pool of some numbers that may occur relatively
often. When a numerical expression evaluates to a cached value, it
returns
Salvatore DI DIO wrote:
> Hello,
>
> I know Python does not have variables, but names.
> Multiple names cant then be bound to the same objects.
>
> So this behavior
>
b = 234
v = 234
b is v
> True
>
> according to the above that is ok
>
>
>
> But where is the consistency ? if
On 02/03/2016 09:32, Salvatore DI DIO wrote:
> Hello,
>
> I know Python does not have variables, but names.
> Multiple names cant then be bound to the same objects.
>
> So this behavior
Python has variables. They are just not the kind of variables
you find in C and variations but more like variab
Den 02-03-2016 kl. 09:32 skrev Salvatore DI DIO:
Hello,
I know Python does not have variables, but names.
Multiple names cant then be bound to the same objects.
So this behavior
b = 234
v = 234
b is v
True
according to the above that is ok
But where is the consistency ? if I try :
v =
Hello,
I know Python does not have variables, but names.
Multiple names cant then be bound to the same objects.
So this behavior
>>> b = 234
>>> v = 234
>>> b is v
True
according to the above that is ok
But where is the consistency ? if I try :
>>> v = 890
>>> w = 890
>>> v is w
False
It
36 matches
Mail list logo