feb5a2fe3e6b32901b2ab80dd660d4c1640ba4aa,newreads.py,,lookup_books,#Any#,281
Before Change
val = val.strip()
try:
bookid = int(val)
book = api.book_by_id(bookid)
print(book)
print(book.desc)
After Change
// If the argument is all digits, it"s presumably an ID,
// either an ISBN13 or a Goodreads ID.
if val.isdigit():
if args.ISBN or len(val) == 13:
book = api.book_by_ISBN(val)
if not book:
print("No book with ISBN", val)
continue
else:
book = api.book_by_id(val)
if not book:
print("No book with ID", val)
continue
print(book)
print(book.desc)
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: akkana/scripts
Commit Name: feb5a2fe3e6b32901b2ab80dd660d4c1640ba4aa
Time: 2019-06-28
Author: akkana@shallowsky.com
File Name: newreads.py
Class Name:
Method Name: lookup_books
Project Name: geekcomputers/Python
Commit Name: 370e9904b001798fb6795170ca30d99f623ae1ce
Time: 2020-11-01
Author: yk66478@gmail.com
File Name: addition.py
Class Name:
Method Name:
Project Name: TheAlgorithms/Python
Commit Name: 7dff214d9ba2bd178830d06422073022def49ba3
Time: 2016-07-29
Author: me@sergeytsaplin.com
File Name: BinarySeach.py
Class Name:
Method Name: