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
The methods return messages lists by default, and iterators if the nlm_generator constructor parameter is True
or pyroute2.config.nlm_generator == True.
The plan
Return iterators unconditionally as the only option and make API consistent.
The reason
The support of both iterators and lists:
requires monkey patching
complicates testing
complicates code understanding
To try already now
It is possible to try the new API now. Thus the methods that return lists should return iterators. Some issues are still possible, though. To be fixed asap.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Current situation
Methods:
get()
nlm_request()
nlm_request_batch()
The methods return messages lists by default, and iterators if the
nlm_generator
constructor parameter isTrue
or
pyroute2.config.nlm_generator == True
.The plan
Return iterators unconditionally as the only option and make API consistent.
The reason
The support of both iterators and lists:
To try already now
It is possible to try the new API now. Thus the methods that return lists should return iterators. Some issues are still possible, though. To be fixed asap.
option 1. using the config
option 2. using the constructor parameter
Beta Was this translation helpful? Give feedback.
All reactions