如何逐行描述Python代码?

如何逐行描述Python代码?,第1张

如何逐行描述Python代码

我相信这就是Robert
Kern的line_profiler
目的。从链接:

File: pystone.pyFunction: Proc2 at line 149Total time: 0.606656 sLine #      Hits         Time  Per Hit   % Time  Line Contents==============================================================   149          @profile   150          def Proc2(IntParIO):   151     50000        82003      1.6     13.5      IntLoc = IntParIO + 10   152     50000        63162      1.3     10.4      while 1:   153     50000        69065      1.4     11.4          if Char1Glob == 'A':   154     50000        66354      1.3     10.9   IntLoc = IntLoc - 1   155     50000        67263      1.3     11.1   IntParIO = IntLoc - IntGlob   156     50000        65494      1.3     10.8   EnumLoc = Ident1   157     50000        68001      1.4     11.2          if EnumLoc == Ident1:   158     50000        63739      1.3     10.5   break   159     50000        61575      1.2     10.1      return IntParIO


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5655551.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存