-
-
Save michprev/4ace9121079f21cb8d9267f78481cff2 to your computer and use it in GitHub Desktop.
pdbr highlighting issue minimal example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
import pdbr | |
class NotConnectedError(Exception): | |
pass | |
def _check_connected(f): | |
@functools.wraps(f) | |
def wrapper(*args, **kwargs): | |
if not args[0].connected: | |
raise NotConnectedError("Not connected to a chain") | |
return f(*args, **kwargs) | |
return wrapper | |
class X: | |
connected = True | |
@_check_connected | |
def fib(self, n): | |
if n < 2: | |
breakpoint() | |
return n | |
return self.fib(n-1) + self.fib(n-2) | |
def main(): | |
x = X() | |
x.fib(100) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment