Package nflgame :: Module game :: Class Drive
[frames] | no frames]

Class Drive

source code

object --+
         |
        Drive

Drive represents a single drive in an NFL game. It contains a list of all plays that happened in the drive, in chronological order. It also contains meta information about the drive such as the start and stop times and field position, length of possession, the number of first downs and a short descriptive string of the result of the drive.

Instance Methods
 
__init__(self, game, drive_num, home_team, data)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__add__(self, other)
Adds the statistics of two drives together.
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, game, drive_num, home_team, data)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__add__(self, other)
(Addition operator)

source code 

Adds the statistics of two drives together.

Note that once two drives are added, the following fields automatically get None values: result, field_start, field_end, time_start and time_end.