On Sat, Nov 7, 2015 at 6:30 AM, Bartc <b...@freeuk.com> wrote: > Is there no way then in Python to declare: > > pi = 3.141519 # etc > > and make it impossible to override?
Nope. Even in C++, where classes can define certain things as const, private, and other such restrictions, you can always get around them by manipulating pointers appropriately. In Python, there's a *convention* that a leading underscore means "private", but the language doesn't enforce anything about it. ChrisA -- https://mail.python.org/mailman/listinfo/python-list