beeprint icon indicating copy to clipboard operation
beeprint copied to clipboard

不能格式化字符串变量

Open vewWLE829 opened this issue 8 years ago • 3 comments

code

from beeprint.printer import pp

class A:
    a =1
    b =2
    c= '3333'

a = A()
pp(a)

Traceback (most recent call last): File "e:/workCode/athena/test.py", line 9, in pp(a) File "C:\Program Files\Python36\lib\site-packages\beeprint\printer.py", line 59, in pp print_obj_path() File "C:\Program Files\Python36\lib\site-packages\beeprint\debug_kit.py", line 62, in print_obj_path passed_arg_name = groups.group(1) AttributeError: 'NoneType' object has no attribute 'group'

vewWLE829 avatar Dec 02 '17 02:12 vewWLE829

不能格式化字符串,不知道出了什么问题

vewWLE829 avatar Dec 13 '17 10:12 vewWLE829

好好好,等我有空搞一搞……

panyanyany avatar Dec 13 '17 10:12 panyanyany

本来这个 print_obj_path 是用来打印错误信息的,不过这个函数好像也出错了。 你能不能把 C:\Program Files\Python36\lib\site-packages\beeprint\printer.py 第 59 行的 print_obj_path() 给注释掉再给我看看有什么错误信息?

panyanyany avatar Dec 16 '17 06:12 panyanyany