This repository was archived by the owner on Nov 12, 2021. It is now read-only.

Description
Node class docstring says:
"...accessing non-existent attributes will still return a Graph... You’ll have to check for the presence of a key first, to make sure what you're trying to access actually exists"
def user_location(user_id):
user = graph[user_id]()
if 'location' in user:
return user.location
return False
but in my tests if 'anything' in a_node always returns True.
I thought maybe I could do 'anything' in a_node.as_dict() ...but this throws Http 400 error from Facebook, I guess the unbunchify call unintentionally causes a load of weird API lookups via the getitem machinery of Graph/Node classes.
This works:
if 'location' in user.keys():
myvar = user.location