Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Functions can return new class definitions- the "class" keyword represents an expression, not a statement.

As such, you could write a function that takes in as an argument a class, and return a new class definition that extends the argument you provided... Or any number of other dubious practices.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: