namespace Foo.Bar class X pass use Foo use Foo.Bar use Foo.Bar.Baz # .error. Cannot find namespace "Baz" in "Foo.Bar". class P def main is shared baz = Baz() print baz