mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
nested_dict documenting comment.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
This commit is contained in:
committed by
Edward Z. Yang
parent
5989b05ecc
commit
0589dfab81
@ -1,5 +1,11 @@
|
|||||||
# TODO: refactor nested_dict into common library with ATen
|
# TODO: refactor nested_dict into common library with ATen
|
||||||
class nested_dict(object):
|
class nested_dict(object):
|
||||||
|
"""
|
||||||
|
A nested dict is a dictionary with a parent. If key lookup fails,
|
||||||
|
it recursively continues into the parent. Writes always happen to
|
||||||
|
the top level dict.
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, base, parent):
|
def __init__(self, base, parent):
|
||||||
self.base, self.parent = base, parent
|
self.base, self.parent = base, parent
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user