[Python-ideas] Mitigating 'self.' Method Pollution
Serhiy Storchaka
storchaka at gmail.com
Sat Jul 11 12:19:17 CEST 2015
On 11.07.15 11:40, Nick Coghlan wrote:
> Alternative proposal:
>
> def keep_moving_gravity(self):
> .y += .gravity
> .y = max(.y, 0)
> .y = min(.y, height - 1)
[...]
> The main downside is that a leading dot isn't as good a visual
> indicator as a dot appearing between two other characters.
I suggest $. It is well known indicator in other languages. :-)
def keep_moving_gravity(self):
$y += $gravity
$y = max($y, 0)
$y = min($y, height - 1)
More information about the Python-ideas
mailing list