good, readable code: node["get_weight"] = lambda node=node: node["weight"] + sum(map(lambda x: x["get_weight"](), node["children"].values()))
good, readable code: node["get_weight"] = lambda node=node: node["weight"] + sum(map(lambda x: x["get_weight"](), node["children"].values()))
Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.
All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.