A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-January/076614.html below:

[Python-Dev] functions vs methods (was Re: trunc())

[Python-Dev] functions vs methods (was Re: trunc()) [Python-Dev] functions vs methods (was Re: trunc())Daniel Stutzbach daniel at stutzbachenterprises.com
Mon Jan 28 23:28:23 CET 2008
On Jan 28, 2008 4:00 PM, Guido van Rossum <guido at python.org> wrote:
> No, using trunc(x) makes it clear that the argument and return value
> are numbers. Using x.trunc() doesn't.

How often do you expect someone to be looking at code where a trunc()
method is being called and the variable could plausibly be both a
number or something else?  (a Google Code search for "def trunc(self)"
lang:python returns 1 hit)

How does the that additional value weigh against the cost of adding
another builtin and trying to explain trunc() versus int() to new
users?

-- 
Daniel Stutzbach, Ph.D.             President, Stutzbach Enterprises LLC
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4