{"action":"opened","issue":{"url":"https://api.github.com/repos/rdkit/rdkit/issues/522","labels_url":"https://api.github.com/repos/rdkit/rdkit/issues/522/labels{/name}","comments_url":"https://api.github.com/repos/rdkit/rdkit/issues/522/comments","events_url":"https://api.github.com/repos/rdkit/rdkit/issues/522/events","html_url":"https://github.com/rdkit/rdkit/issues/522","id":88753718,"number":522,"title":"descriptor.__name__ returns <lambda>","user":{"login":"samoturk","id":3465473,"avatar_url":"https://avatars.githubusercontent.com/u/3465473?v=3","gravatar_id":"","url":"https://api.github.com/users/samoturk","html_url":"https://github.com/samoturk","followers_url":"https://api.github.com/users/samoturk/followers","following_url":"https://api.github.com/users/samoturk/following{/other_user}","gists_url":"https://api.github.com/users/samoturk/gists{/gist_id}","starred_url":"https://api.github.com/users/samoturk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samoturk/subscriptions","organizations_url":"https://api.github.com/users/samoturk/orgs","repos_url":"https://api.github.com/users/samoturk/repos","events_url":"https://api.github.com/users/samoturk/events{/privacy}","received_events_url":"https://api.github.com/users/samoturk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-16T15:03:55Z","updated_at":"2015-06-16T15:03:55Z","closed_at":null,"body":"```python\r\nfrom rdkit.Chem import Descriptors\r\ndescriptors = [Descriptors.MolWt, Descriptors.MolLogP, Descriptors.MolMR, Descriptors.NumHAcceptors, \r\n               Descriptors.NumHDonors, Descriptors.HeavyAtomCount, Descriptors.FractionCSP3,\r\n               Descriptors.NumAliphaticCarbocycles, Descriptors.NumAliphaticHeterocycles, Descriptors.NumAliphaticRings,\r\n               Descriptors.NumAromaticCarbocycles, Descriptors.NumAromaticHeterocycles, Descriptors.NumAromaticRings,\r\n               Descriptors.NumHeteroatoms, Descriptors.NumRotatableBonds, Descriptors.TPSA]\r\n\r\nfor x in descriptors:\r\n    print x.__name__\r\n```\r\nOutput:  \r\n```\r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\nHeavyAtomCount  \r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\n<lambda>  \r\n<lambda> \r\n```\r\nI had a quick look at the code and the problem seems in the way how descriptor methods are constructed. By default ```__name__``` would return the name of the function except if the function is lambda (as is the case here). One solution would be to assign ```__name__``` manually similarly as ``` __doc__``` is but I'm not sure if this is the optimal way.."}}