Y
Hacker News
new
|
ask
|
show
|
jobs
by
pyuser583
1458 days ago
Wouldn’t this throw an attribute error if cache.get didn’t return an object with .data?
1 comments
OJFord
1458 days ago
Yes, just as it would if you made the assignment on a line previous to the return statement.
It would also error if there was no 'cache' in scope, and anything else you can imagine.
link
It would also error if there was no 'cache' in scope, and anything else you can imagine.