Ethan Furman a écrit :
(snip)
The best answer I can give is that you do not want to use 'name' to
reference the object itself, but only for printing/debugging purposes.
Which is what the OP stated !-)
'name' is just a label for your object, and not necessarily the only
label; that
josef wrote:
On Aug 27, 1:35 pm, Ethan Furman et...@stoneleaf.us wrote:
josef wrote:
Thanks to everyone who responded.
I will be going with some sort of a = MyClass(name = 'a') format. It's
the Python way.
For me, it was very hard to accept that EVERYTHING is an object
reference. And
On Aug 27, 1:35 pm, Ethan Furman et...@stoneleaf.us wrote:
josef wrote:
Thanks to everyone who responded.
I will be going with some sort of a = MyClass(name = 'a') format. It's
the Python way.
For me, it was very hard to accept that EVERYTHING is an object
reference. And that there
Thanks to everyone who responded.
I will be going with some sort of a = MyClass(name = 'a') format. It's
the Python way.
For me, it was very hard to accept that EVERYTHING is an object
reference. And that there are no object reference names, just string
entries in dictionaries. But I think it
josef wrote:
Thanks to everyone who responded.
I will be going with some sort of a = MyClass(name = 'a') format. It's
the Python way.
For me, it was very hard to accept that EVERYTHING is an object
reference. And that there are no object reference names, just string
entries in dictionaries.
On Tuesday 25 August 2009 21:32:09 Aahz wrote:
In article mailman.164.1250837108.2854.python-l...@python.org,
Hendrik van Rooyen hend...@microcorp.co.za wrote:
On Friday 21 August 2009 08:07:18 josef wrote:
My main focus of this post is: How do I find and use object reference
memory
In article mailman.164.1250837108.2854.python-l...@python.org,
Hendrik van Rooyen hend...@microcorp.co.za wrote:
On Friday 21 August 2009 08:07:18 josef wrote:
My main focus of this post is: How do I find and use object reference
memory locations?
a = [1,2,3,4]
id(a)
8347088
Of course,
josef a écrit :
(snip)
I think that something like a = MyClass0(name =
'a', ...) is a bit redundant. Are definitions treated the same way?
How would one print or pass function names?
In Python, classes and functions are objects too. The class and def
statements are mostly syntactic sugar
On Aug 20, 2009, at 11:07 PM, josef wrote:
To begin, I'm new with python. I've read a few discussions about
object references and I think I understand them.
To be clear, Python uses a Pass By Object Reference model.
x = 1
x becomes the object reference, while an object is created with the
type
On Thu, Aug 20, 2009 at 11:34 PM, Miles Kaufmannmile...@umich.edu wrote:
On Aug 20, 2009, at 11:07 PM, josef wrote:
snip
The following is what I would like to do:
I have a list of class instances dk = [ a, b, c, d ], where a, b, c, d
is an object reference. Entering dk gives me the object:
On Friday 21 August 2009 08:07:18 josef wrote:
My main focus of this post is: How do I find and use object reference
memory locations?
a = [1,2,3,4]
id(a)
8347088
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 21, 1:34 am, Miles Kaufmann mile...@umich.edu wrote:
On Aug 20, 2009, at 11:07 PM, josef wrote:
To begin, I'm new with python. I've read a few discussions about
object references and I think I understand them.
To be clear, Python uses a Pass By Object Reference model.
x = 1
x
josef wrote:
To begin, I'm new with python. I've read a few discussions about
object references and I think I understand them.
To be clear, Python uses a Pass By Object Reference model.
x = 1
x becomes the object reference, while an object is created with the
type 'int', value 1, and identifier
josef a écrit :
To begin, I'm new with python. I've read a few discussions about
object references and I think I understand them.
To be clear, Python uses a Pass By Object Reference model.
x = 1
x becomes the object reference, while an object is created with the
type 'int', value 1, and
josef jos...@gmail.com writes:
To be clear, Python uses a Pass By Object Reference model.
Yes. (I'm glad this concept has propagated to newcomers so well :-)
x = 1
x becomes the object reference
It becomes *a* reference to that object, independent of any other
references to that same
On Aug 21, 4:26 am, Ben Finney ben+pyt...@benfinney.id.au wrote:
josef jos...@gmail.com writes:
To be clear, Python uses a Pass By Object Reference model.
Yes. (I'm glad this concept has propagated to newcomers so well :-)
I found one really good discussion on python semantics versus other
josef jos...@gmail.com writes:
On Aug 21, 4:26 am, Ben Finney ben+pyt...@benfinney.id.au wrote:
Note that, after that list is created, each item in that list is
*also* a reference to the corresponding object. That is, ‘a’ is a
reference to an object, and ‘dk[0]’ is a *different* reference
17 matches
Mail list logo