Trying to figure out the data type from the code snippet

Chupo bad_n_mad at yahoo.com
Wed Jan 30 21:35:59 EST 2019


In article <mailman.438.1548821581.4816.python-list at python.org>, 
Cameron Simpson <cs at cskk.id.au> says...

<snip>

> What you're probably wanting to know is that the print statement calls 
> str(x) for every "x" which it is asked to print, and that "p" has a 
> __str__ method returning the "R.Wilson" string (etc). All object's have 
> an __str__ method, and for "p" it has been defined to produce what looks 
> like a player's name.
> 

Yes, that is exactly what answers my question, thank you very much for 
such a comprehensive explanation!

I couldn't use type() because implementation of:

game.players.passing()

is not known. This is all info I saw:

https://stackoverflow.com/q/28056171/1324175

I searched Google using quite a few search strings, for example:

python object returning value
python class returning value
python dot
python attribute

but didn't find an answer because I didn't know what exactly should I 
search for.

Best Regards
-- 
Let There Be Light
Custom LED driveri prema specifikacijama
http://tinyurl.com/customleddriver

Chupo



More information about the Python-list mailing list