{"action":"closed","issue":{"url":"https://api.github.com/repos/IssueMigrationTest/Test5/issues/73","labels_url":"https://api.github.com/repos/IssueMigrationTest/Test5/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/IssueMigrationTest/Test5/issues/73/comments","events_url":"https://api.github.com/repos/IssueMigrationTest/Test5/issues/73/events","html_url":"https://github.com/IssueMigrationTest/Test5/issues/73","id":65101753,"number":73,"title":"Class variable error when inheritance occured accross different files","user":{"login":"ShedskinBot","id":11687421,"avatar_url":"https://avatars.githubusercontent.com/u/11687421?v=3","gravatar_id":"","url":"https://api.github.com/users/ShedskinBot","html_url":"https://github.com/ShedskinBot","followers_url":"https://api.github.com/users/ShedskinBot/followers","following_url":"https://api.github.com/users/ShedskinBot/following{/other_user}","gists_url":"https://api.github.com/users/ShedskinBot/gists{/gist_id}","starred_url":"https://api.github.com/users/ShedskinBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShedskinBot/subscriptions","organizations_url":"https://api.github.com/users/ShedskinBot/orgs","repos_url":"https://api.github.com/users/ShedskinBot/repos","events_url":"https://api.github.com/users/ShedskinBot/events{/privacy}","received_events_url":"https://api.github.com/users/ShedskinBot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IssueMigrationTest/Test5/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/IssueMigrationTest/Test5/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/IssueMigrationTest/Test5/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-29T22:18:44Z","updated_at":"2015-03-29T22:19:35Z","closed_at":"2015-03-29T22:19:35Z","body":"**Issue by jason.mi...@gmail.com**\n_16 May 2010 at 3:31 GMT_\n_Originally opened on Google Code_\n\n----\n\n```\nClass variable error when inheritance occured accross different files\nMaybe namespace issue\nSS Ver: r1451\nThe following 2 files can't compile when testb.py start with \"import \ntesta\" and \"from testa import aa\", but works well with \"from testa import \n*\" \nIf we remove the class helper and the helper.enable in aa.__init__(), then \nthey can't compile when testb.py start with \"import testa\", but works well \nwith \"from testa import aa\" and  \"from testa import *\" \n\nIn normal usage scenario, all 3 above \"import\" cases should work\n\nDetails:\n\nroot@ubuntu10-64:~/tools/test# cat testa.py\n\nclass helper():\n  flag=0\n  @staticmethod\n  def enable():\n    helper.flag=1\n\nclass aa():\n  #class_var1={}\n  class_var2=0\n  def __init__(self):\n    helper.enable()\n    aa.class_var2=1\n    print \"init a\"\n    temp=[1,2]\n    #aa.class_var1.update({'a':bb()})\n    for i in temp:\n      print i\n\nroot@ubuntu10-64:~/tools/test# cat testb.py\nfrom testa import aa\nclass b(aa):\n  pass\ninstance=b()\n\nroot@ubuntu10-64:~/tools/test# shedskin testb\n*** SHED SKIN Python-to-C++ Compiler 0.5 ***\nCopyright 2005-2010 Mark Dufour; License GNU GPL version 3 (See LICENSE)\n\n[iterative type analysis..]\n**\niterations: 2 templates: 61\n[generating c++ code..]\n*WARNING* testa.py:11: class 'helper' has no method 'enable'\n\nroot@ubuntu10-64:~/tools/test# make\ng++  -O0 -pipe -Wno-deprecated  -I. -I/usr/local/lib/python2.6/dist-\npackages/shedskin/lib testa.cpp /usr/local/lib/python2.6/dist-\npackages/shedskin/lib/builtin.cpp testb.cpp /usr/local/lib/python2.6/dist-\npackages/shedskin/lib/re.cpp -lgc -lpcre  -o testb\ntesta.cpp: In static member function ‘static void* \n__testa__::helper::enable()’:\ntesta.cpp:19: error: ‘class __shedskin__::class_’ has no member named \n‘flag’\ntesta.cpp: In member function ‘void* __testa__::aa::__init__()’:\ntesta.cpp:37: error: ‘class __shedskin__::class_’ has no member named \n‘enable’\nmake: *** [testb] Error 1\n\n```\n\n\n"}}