How to get Properties Editor tabs context for the active object?
Dynamic enum property.

This is a dynamic enum property, ie it changes dependant on context.

We can get all possible members, from the properties rna data  enum_items

&gt;&gt;&gt; for i, a in enumerate(C.screen.areas):
...     i, a.type
...     
(0, 'PROPERTIES')
(1, 'CONSOLE')
(2, 'OUTLINER')
(3, 'TEXT_EDITOR')

&gt;&gt;&gt; s = C.screen.areas[0].spaces.active
&gt;&gt;&gt; s.bl_rna.properties['context'].enum_items.keys()
['TOOL', 'SCENE', 'RENDER', 'OUTPUT', 'VIEW_LAYER', 'WORLD', 'OBJECT', 'CONSTRAINT', 'MODIFIER', 'DATA', 'BONE', 'BONE_CONSTRAINT', 'MATERIAL', 'TEXTURE', 'PARTICLES', 'PHYSICS', 'SHADERFX']


or similarly from the type

bpy.types.SpaceProperties.bl_rna.properties['context']


whereas the error message, as shown in question, shows those members available for that context. 

A dynamic enum property has a method that populates its items depending on context. I am unaware of how to tap into the method and get only context members.  

Pinning an object to the panel also changes context tabs displayed.

Henceforth apping them out manually (with some assistance) is AFAIK going to have to do.

This is one of the rare cases where I would recommend using try / except clause.  We could for instance write a script that creates sets for each data type.  We know the union (above) and can find a common set and those unique to each type.  For instance can grep the context members out of the exception message.  Pretty ugly example below, mesh object selected in edit mode, improve using re expression perhaps.

&gt;&gt;&gt; try:
...     s.context = "Foo"
... except TypeError as e:
...     m = str(e.args)
...     m[m.find("(", 1) + 1:-4].replace("\\'", "").replace(" ", "").split(",")
...     
['TOOL', 'RENDER', 'OUTPUT', 'VIEW_LAYER', 'SCENE', 'WORLD', 'OBJECT', 'MODIFIER', 'PARTICLES', 'PHYSICS', 'CONSTRAINT', 'DATA', 'MATERIAL', 'TEXTURE']


Worth mentioning that DATA will display mesh data for a mesh object, armature data for an armature object,  curve data for a curve etc