Skip to content

Instantly share code, notes, and snippets.

View Nourz1234's full-sized avatar

Nour Nasser Nourz1234

  • Egypt
View GitHub Profile
@Nourz1234
Nourz1234 / anonymous_class.py
Last active February 14, 2024 11:41
Introducing new features into python! block scopes using curly braces, commas (instead of semicolons), multiline lambdas/anonymous functions, anonymous classes, "This" and "Base" keywords instead of "self" and "super", code minification, more commas, non-indentation sensitive code and more!
from madness import *
main = Function(lambda: {
# anonymous classes!
# notice the use of the magical keyword "This"
Person := Class(Object) (
"Person", # Optional class name
__init__ = lambda name, age: {