[SciPy-dev] P3 - my education [was: change print statements to print functions in docstrings]
Sat Aug 15 13:18:46 CDT 2009
--- On Sat, 8/15/09, Ryan May <firstname.lastname@example.org> wrote:
> As a curious "innocent bystander" that only goes
> along with earth shattering software change "kicking
> and screaming" ;-) why did the Python 3 PTB decide to
> change such a fundamental construct?
> One reason is that by making it a function, it's easy
> to replace it with a different, custom function. It also
But isn't that the purpose an object's __str__ method being bound to print by default? Unless, I guess, you want to usurp print globally; but then can't you still just assign your replacement to print in the top level namespace and be done w/it? Personally, if I were among the PTB, I'd need more...
> (IMO) seems a bit more pythonic.
Um, why? Perhaps it stems from one's personal preference regarding the way one prefers to program? Having "grown-up" a procedural programmer, I'm now an OO "true believer," though I feel that one of Python's greatest strengths is that it fully supports "going both ways"; because of that, I feel neither function nor method has the edge in being more Pythonic. (I wonder, however, what the dominant mode is in practice - certainly OO in GUI/Event Driven programming, no?)
> Remeber, the pain of
> breakage was kind of the point of 3.0. :)
PS: In recognition that this branch of this thread is OT, everyone please feel free to email me your thoughts off-list.
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
> -----Inline Attachment Follows-----
> Scipy-dev mailing list
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the Scipy-dev