Do you have a ref for your claim about python? From 2.7 sources I have:

```
typedef struct {
    PyObject_HEAD
    int fd;
    unsigned int readable : 1;
    unsigned int writable : 1;
    signed int seekable : 2; /* -1 means unknown */
    unsigned int closefd : 1;
    PyObject *weakreflist;
    PyObject *dict;
} fileio;
```

I still beleave that an enum or a bit set is the way to go. For Serge : PIPS' souvenirs :)