Skip to content

Set Objects#

_P4OOSet objects are primarily used for querying. We want to encourage use cases that take advantage of set operations operating on multiple objects at once, rather than iterating through individual objects.

_P4OOSet dataclass #

Bases: OrderedSet, _P4OOBase

_P4OOSet provides common behaviors for grouping of all P4OO Spec-based objects.

_query(setObjType=None, **kwargs) #

_query() is an instance method, but returns another, possibly unrelated object.

Where an instance is not already available, query can be called as follows:

p4Changes = P4OO.ChangeSet.ChangeSet().query( {"files": changeFileRevRange, "maxresults": 1})

Instantiating a _Set object just for this purpose is cheap, but is not free. So sorry.

listObjectIDs() #

Method to help convert a set of objects into a list of the names of the objects.