[Tutor] Python Memory Allocation -- deep learning
Steven D'Aprano
steve at pearwood.info
Mon Jul 30 19:33:40 EDT 2018
On Tue, Jul 31, 2018 at 02:58:56AM +1000, Steven D'Aprano wrote:
> The *only* thing you have seen which is a language feature is this rule:
>
> - if two objects, a and b, have the same ID *at the same time*, then
> "a is b" will be true;
>
> - if "a is b" is false, then a and b must have different IDs.
Sorry, I forgot to mention that for both of those, the reverse applies
as well. Perhaps a better way to put it is this:
- if "a is b", then a and b must have the same ID, and vice versa.
- if "a is not b", then a and b must have different IDs, and vice versa.
--
Steve
More information about the Tutor
mailing list