¡@

Home 

python Programming Glossary: webtext

dictionary shared between objects for no reason?

http://stackoverflow.com/questions/10710689/dictionary-shared-between-objects-for-no-reason

the same length. It works fine when a single instance of WebText is created. But when multiple WebText instances are created.. a single instance of WebText is created. But when multiple WebText instances are created then the new variable seems to be shared.. example import nltk from operator import itemgetter class WebText freq_dist_weighted def __init__ self text tokens nltk.wordpunct_tokenize..