On 03/11/2015 04:33 PM, Mario Figueiredo wrote: > The following code runs just fine. But PyCharm flags the assignment > with a warning telling me that generate() does not return anything and > the I lose code completion on the mmap variable. > > if __name__ == '__main__': > mmap = Map.generate(12, 24) > print(mmap.width, mmap.height, mmap.author) > > I need to understand if this is just a glitch of the IDE or I am doing > indeed something that is frowned upon and ended up caught in a > misleading static analysis warning.
You're code is good. The only question is if you /really/ need a singleton -- and only you can answer that (although plenty of folks will tell you you don't ;) . -- ~Ethan~
signature.asc
Description: OpenPGP digital signature
-- https://mail.python.org/mailman/listinfo/python-list