diff --git a/Doc/howto/enum.rst b/Doc/howto/enum.rst index 748ec5b2436..18e13fcf9f5 100644 --- a/Doc/howto/enum.rst +++ b/Doc/howto/enum.rst @@ -1152,6 +1152,14 @@ the following are true: >>> (Color.RED | Color.GREEN).name 'RED|GREEN' + >>> class Perm(IntFlag): + ... R = 4 + ... W = 2 + ... X = 1 + ... + >>> (Perm.R & Perm.W).name is None # effectively Perm(0) + True + - multi-bit flags, aka aliases, can be returned from operations:: >>> Color.RED | Color.BLUE