[Python-ideas] Statements vs Expressions... why?

Mathias Panzenböck grosser.meister.morti at gmx.net
Fri Sep 12 03:15:23 CEST 2008

The only thing I'd like would be anonymous classes (like in java) and anonymous

class A(object):
	def some_method(self):

def function_that_wants_a_A(a):

	def some_method(self):
		# I really like this feature of java
		# granted, it makes a lot more sense in the
		# context of a language like java.
		# there it's very handy
		print "this is my derived anonymous class"

def function_that_wants_a_callback(callback):

	# do a lot of stuff that does not fit into a lambda
	# this reminds a bit of rubies closures ;)

I don't think anything else concerning statement as expression is in any way
necessary or handy.

More information about the Python-ideas mailing list