Skip to content

Commit 8a71ec3

Browse files
committed
added known limitation and punting for now!
1 parent 998b5e1 commit 8a71ec3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎v3/pg_logger.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ def create_encoded_stack_entry(cur_frame):
470470
encoded_val = self.encoder.encode(v)
471471

472472
# UGH, this is SUPER ugly but needed for nested function defs
473+
#
474+
# NB: Known limitation -- this will work only for functions
475+
# defined on the top level, not those that are nested within,
476+
# say, tuples or lists
473477
if type(v) in (types.FunctionType, types.MethodType):
474478
try:
475479
enclosing_frame = self.closures[v]
@@ -589,6 +593,10 @@ def create_encoded_stack_entry(cur_frame):
589593
encoded_val = self.encoder.encode(v)
590594

591595
# UGH, this is SUPER ugly but needed for nested function defs
596+
#
597+
# NB: Known limitation -- this will work only for functions
598+
# defined on the top level, not those that are nested within,
599+
# say, tuples or lists
592600
if type(v) in (types.FunctionType, types.MethodType):
593601
try:
594602
enclosing_frame = self.closures[v]

0 commit comments

Comments
 (0)