File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,10 @@ def encode(self, dat):
168168 if argspec .keywords :
169169 printed_args .extend (['**' + e for e in argspec .keywords ])
170170
171- pretty_name = get_name (dat ) + '(' + ', ' .join (printed_args ) + ')'
171+ func_name = get_name (dat )
172+ if func_name == '<lambda>' :
173+ func_name = u"\u03BB " # Unicode lambda :)
174+ pretty_name = func_name + '(' + ', ' .join (printed_args ) + ')'
172175 new_obj .extend (['FUNCTION' , pretty_name , None ]) # the final element will be filled in later
173176 else :
174177 typeStr = str (typ )
Original file line number Diff line number Diff line change @@ -258,9 +258,10 @@ def create_encoded_stack_entry(cur_frame):
258258
259259 cur_name = cur_frame .f_code .co_name
260260
261- # special case for lambdas - grab their line numbers too
261+ # special case for lambdas - grab their line numbers too (or not)
262262 if cur_name == '<lambda>' :
263- cur_name = '<lambda:line ' + str (cur_frame .f_code .co_firstlineno ) + '>'
263+ # Unicode lambda :)
264+ cur_name = u"\u03BB " # + ':line' + str(cur_frame.f_code.co_firstlineno)
264265 elif cur_name == '' :
265266 cur_name = 'unnamed function'
266267
You can’t perform that action at this time.
0 commit comments