Question: Is there any way to translate this Java code into Python?

```
class Foo
{
    final static private List<Thingy> thingies = 
       ImmutableList.of(thing1, thing2, thing3);
}

```

e.g. `thingies` is an immutable private list of `Thingy` objects that belongs to the `Foo` class rather than its instance.

I know how to define static class variables from this question [Static class variables in Python](https://stackoverflow.com/questions/68645/static-class-variables-in-python) but I don't know how to make them immutable and private.

Answer: 
You can make it un-writeable (subtly different from immutable) by using properties, but there is no way to make it private -- that goes against Python's philosophy.

```
class Foo(object):    # don't need 'object' in Python 3
    @property
    def thingies(self):
        return 'thing1', 'thing2', 'thing3'

f = Foo()
print f.thingies
#('thing1', 'thing2', 'thing3')
f.thingies = 9
#Traceback (most recent call last):
#  File "test.py", line 8, in <module>
#    f.thingies = 9
#AttributeError: can't set attribute

```

Whether it's immutable or not depends on what you return; if you return a mutable object you may be able to mutate that *and* have those changes show up in the instance/class.

```
class FooMutable(object):
    _thingies = [1, 2, 3]
    @property
    def thingies(self):
        return self._thingies

foo = FooMutable()
foo.thingies.append(4)
print foo.thingies
# [1, 2, 3, 4]

```

This will let you mutate `thingies`, and because the object returned is the same object kept in the instance/class the changes will be reflected on subsequent access.

Compare that with:

```
class FooMutable(object):
    @property
    def thingies(self):
        return [1, 2, 3]

foo = FooMutable()
foo.thingies.append(4)
print foo.thingies
# [1, 2, 3]

```

Because a brand new list is returned each time, changes to it are not reflected in subsequent accesses.
You can achieve the `final` part using type hints\*. As others have said, `__` achieves the `private` aspect well enough, so

```py
from typing import List
from typing_extensions import Final

class Foo:
    __thingies: Final[List[Thingy]] = ImmutableList.of(thing1, thing2, thing3)

```

I'll leave the definition of `ImmutableList` to you. A `tuple` will probably do.

\*with the usual caveat that users can ignore them