home *** CD-ROM | disk | FTP | other *** search
/ Freelog 33 / Freelog033.iso / Progr / Python-2.2.1.exe / TEST_SYMTABLE.PY < prev    next >
Encoding:
Python Source  |  2001-02-15  |  231 b   |  9 lines

  1. from test_support import verify
  2.  
  3. import _symtable
  4.  
  5. symbols = _symtable.symtable("def f(x): return x", "?", "exec")
  6.  
  7. verify(symbols[0].name == "global")
  8. verify(len([ste for ste in symbols.values() if ste.name == "f"]) == 1)
  9.