You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bit verbose though and requires a try/except. Also it's a bit error prone (race condition) as the user may forget to catch NoSuchProcess.
Proposal is to introduce 2 new parameters, attrs and ad_value, which will be passed to Process.as_dict().
When attrs is specified Process.as_dict() is called and the resulting dict is stored as a info attribute which is attached to the returned Process instance:
Right now the designated way to iterate over all process and query them is:
This is a bit verbose though and requires a try/except. Also it's a bit error prone (race condition) as the user may forget to catch NoSuchProcess.
Proposal is to introduce 2 new parameters,
attrs
andad_value
, which will be passed toProcess.as_dict()
.When
attrs
is specifiedProcess.as_dict()
is called and the resulting dict is stored as ainfo
attribute which is attached to the returnedProcess
instance:To retrieve all process info
attrs=[]
shall be #passed.This also introduces the possibility to use list/dict comprehensions:
The text was updated successfully, but these errors were encountered: