Package football2 :: Module player :: Class Player
[hide private]
[frames] | no frames]

Class Player

object --+
         |
        Player

The class Player represents football players in a match statistics program. Only some very basic information for each player is recorded.

A player object is immutable after creation transferring a player between clubs is not directly supported by self class, for instance.

Instance Methods [hide private]
 
__init__(self, name, employer)
Creates a new player with the given basic attributes.
string
get_name(self)
Returns the player's name.
club object
get_employer(self)
Returns the player's employer club.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, employer)
(Constructor)

 

Creates a new player with the given basic attributes.

Parameters:
  • name (string) - the name of the player
  • employer (club object) - the club the player plays for
Overrides: object.__init__

get_name(self)

 

Returns the player's name.

Returns: string
player name

get_employer(self)

 

Returns the player's employer club.

Returns: club object
employer