In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces what debugging commands pdb has in python. It is very detailed and has certain reference value. Friends who are interested must finish reading it.
1. Next executes the next statement, and if this sentence is a function call, it executes the function, followed by the next one of the currently executed statement.
Def stop_here (self, frame):. # if frame has not jumped out of stopframe, always return true if frame is self.stopframe: if self.stoplineno =-1: return False return frame.f_lineno > = self.stoplineno # if frame jumps out of stopframe and enters the next frame, execution will not be interrupted There is another situation until you jump out to stopframe #. If next is interrupted in the return event, the next trace is in the next level frame, and the next level frame can trace to botframe, interrupting while frame is not None and frame is not self.stopframe: if frame is self.botframe: return True frame = frame.f_back return False.
2. Step executes the next command, and if this sentence is a function call, s will execute to the first sentence of the function.
Def stop_here (self, frame):... # stopframe is None if frame is self.stopframe:. # the current frame must be traced back to botframe, returning true while frame is not None and frame is not self.stopframe: if frame is self.botframe: return True frame = frame.f_back return False
3. Return executes the current running function to the end.
Def stop_here (self, frame):. # if the current frame code is executed sequentially, the lineno==stoplineno # of the next frame if executed to the last line of the for loop, and the lineno= self.stoplineno # of the next frame (the first line of the for loop) will be traced back to stopframe and false if it is in a non-botframe With next while frame is not None and frame is not self.stopframe: if frame is self.botframe: return True frame = frame.f_back return False above are all the contents of this article entitled "what are the debugging commands for pdb in python?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.