Using __repr__ or __str__ for own printable class?

Erik Max Francis max at alcyone.com
Tue Apr 15 02:27:59 CEST 2003


Peter Hansen wrote:

> Given that Python is an "agile language", it seems very likely that
> it must be an implementation of Robert Zubrin's XP-style "Mars Direct"
> program for a manned mission to Mars.

Actually, it can manage any kind of trip:

>>> info(stationaryEarthOrbit, highTritonOrbit)
Source: stationary orbit around `Earth'
Destination: medium orbit around `Triton'
Opportunities:
 Opportunity: Earth/Neptune
  Angle: 1.97496428786 rad (113.157118384 deg)
  Period: 31756371.7964 s
Transfers:
 Transfer: out of `stationary orbit around `Earth''
  Duration: 0.0 s
  Burns: 1273.39353752 m/s
 Transfer: Hohmann from `Earth' to `Neptune'
  Duration: 965260524.876 s
  Burns: 11651.5022539, 4053.91436026 m/s
 Transfer: into `Triton'
  Duration: 0.0 s
  Burns: 1817.74724404 m/s
 Transfer: into `medium orbit around `Triton''
  Duration: 0.0 s
  Burns: 322.586540999 m/s
Course: from `stationary orbit around `Earth'' to `medium orbit around
`Triton''
Duration: 965260524.876 s
Deltavee: 19119.1439368 m/s

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Society attacks early when the individual is helpless.
\__/ B.F. Skinner
    CSBuddy / http://www.alcyone.com/pyos/csbuddy/
 A Counter-Strike server log file monitor in Python.




More information about the Python-list mailing list