M
Marcin Ciura
Given
class Node(object):
pass
node = Node()
nextnode = Node()
I tried to refactor the following piece of code
node.next = nextnode
node = nextnode
as
node = node.next = nextnode
only to discover that Python performs chained assignments
backwards compared to other languages, i.e. left-to-right
instead of right-to-left. From the user's perspective,
I can't think of any reasonable argument for keeping it
this way in Python 3000. What is your opinion?
Marcin
class Node(object):
pass
node = Node()
nextnode = Node()
I tried to refactor the following piece of code
node.next = nextnode
node = nextnode
as
node = node.next = nextnode
only to discover that Python performs chained assignments
backwards compared to other languages, i.e. left-to-right
instead of right-to-left. From the user's perspective,
I can't think of any reasonable argument for keeping it
this way in Python 3000. What is your opinion?
Marcin