Skip to content

Commit

Permalink
fix fencepost error when getting source inside decorator in interpret…
Browse files Browse the repository at this point in the history
…er (#651)

Thanks for the patch
  • Loading branch information
timkpaine authored Jul 9, 2024
1 parent a12bfda commit a9d136b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dill/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def findsource(object):
if err:
raise IOError(err)
lbuf = readline.get_current_history_length()
lines = [readline.get_history_item(i)+'\n' for i in range(1,lbuf)]
lines = [readline.get_history_item(i)+'\n' for i in range(1,lbuf+1)]
else:
try: # special handling for class instances
if not isclass(object) and isclass(type(object)): # __class__
Expand Down

0 comments on commit a9d136b

Please sign in to comment.