Implementing POSIX file mode library
I'm confused why you're using a named tuple for PosixPermission. To me an Enum would be a better choice:

class PosixPermission(Flag):
    READ = 4
    WRITE = 2
    EXECUTE = 1
    NONE = 0

    @property
    def perms(self):
        return ''.join(
            name if self &amp; val else '-'
            for name, val in zip('rwx', PosixPermission)
        )




&gt;&gt;&gt; PosixPermission(0)
&lt;PosixPermission.NONE: 0&gt;
&gt;&gt;&gt; PosixPermission(7)
&lt;PosixPermission.READ|WRITE|EXECUTE: 7&gt;
&gt;&gt;&gt; PosixPermission(5)
&lt;PosixPermission.READ|EXECUTE: 5&gt;
&gt;&gt;&gt; PosixPermission(5).perms
'r-x'
&gt;&gt;&gt; PosixPermission(5) &amp; PosixPermission.READ
&lt;PosixPermission.READ: 4&gt;
&gt;&gt;&gt; PosixPermission(5) &amp; PosixPermission.WRITE
&lt;PosixPermission.NONE: 0&gt;
&gt;&gt;&gt; PosixPermission(8)
Traceback (most recent call last):
ValueError: 8 is not a valid PosixPermission




Honestly PosixMode looks pretty good, I think it's reasonable to assume it to be a namedtuple, rather than an object with __slots__. I however wouldn't use __int__ and __str__, and would instead use properties for these.