[Edu-sig] Python Pedagogy

Dan Crosta dcrosta at sccs.swarthmore.edu
Fri Jul 21 18:08:43 CEST 2006


kirby urner wrote:
> On 7/21/06, Andre Roberge <andre.roberge at gmail.com> wrote:
> 
>> The "me" approach is very anthropomorphic and may not work well in all
>> languages.   Mind you, the same is true for "self".
>>
> 
> Yes, deliberately anthropomorphic, put less about turning things into
> people than people into things, as a skill associated with modeling
> ("I am hydroelectric dam"  "I am an airplane" -- what are my behaviors
> and states?).
> 

What about (and this is just a random half-thought, apologies if it 
comes to nothing) using the traditional scope-ish keyword 'my' for 
increased readability?

class Human:
	def __init__(my, name):
		my.name = name

	def __repr__(my):
		return 'My name is %s' % my.name

Just a thought...

- d


More information about the Edu-sig mailing list