New submission from Boštjan Mejak <bostjan.xpe...@gmail.com>:

The syntax to define a class looks like this:

class MyClass:
    pass

Nice and neat.

***
And the syntax to define a function looks like this:

def my_function():
    pass

Hmmm...

***
What if we could define functions (that don't have any parameters) like this:

def my_function:
    pass

***
Is that a possible scenario at this point, or even desirable?

----------
components: Interpreter Core
messages: 395436
nosy: PedanticHacker
priority: normal
severity: normal
status: open
title: Define functions without parentheses (if no parameters given)
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44366>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to