[Python-Dev] n.numbits: method or property? (original) (raw)
Adam Olsen rhamph at gmail.com
Wed Nov 12 06:02:18 CET 2008
- Previous message: [Python-Dev] n.numbits: method or property?
- Next message: [Python-Dev] A statistic for Python tickets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Nov 11, 2008 at 6:59 PM, Mike Klaas <mike.klaas at gmail.com> wrote:
On 11-Nov-08, at 4:16 PM, Mark Dickinson wrote:
More generally, what are the guidelines for determining when it's appropriate to make something a property rather than a method? Both are awkward on numeric types in python, necessitating brackets or a space before the dot: (1).doc 1 .doc
It's only awkward on constants, which should be pretty rare for a numbits property. The expected use case is on a variable.
-- Adam Olsen, aka Rhamphoryncus
- Previous message: [Python-Dev] n.numbits: method or property?
- Next message: [Python-Dev] A statistic for Python tickets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]