Repast / repast4py

Git repository for Repast for Python development
Other
51 stars 4 forks source link

Context.agents(...) API should return a consistent type - list or iterable #65

Open etatara opened 8 months ago

etatara commented 8 months ago

Context.agents(...)

https://github.com/Repast/repast4py/blob/master/src/repast4py/context.py#L322

returns either a list or an iterable function depending on usage, which might be confusing, since using the returned list or iterable can have different implications depending on how it’s handled, e.g. multiple iters over a list is OK, but only works once on an iterable.