pyo3 icon indicating copy to clipboard operation
pyo3 copied to clipboard

Add a new `PyList::try_new` method

Open messense opened this issue 4 years ago • 2 comments
trafficstars

PyList::new requires a infallible iterator which is sometimes awkward to use.

Is this new API desirable?

messense avatar Jun 13 '21 12:06 messense

While I agree that our collection interfaces can definitely be made more user-friendly, I think we should take a bit of time to design something new before adding too many new functions.

I think this loosely combines well with the changes proposed in #1667 as something we can experiment with for 0.15, if you're ok with waiting for it for a bit?

davidhewitt avatar Jun 14 '21 07:06 davidhewitt

While I agree that our collection interfaces can definitely be made more user-friendly, I think we should take a bit of time to design something new before adding too many new functions.

I think this loosely combines well with the changes proposed in #1667 as something we can experiment with for 0.15, if you're ok with waiting for it for a bit?

No problem, it’s not blocking anything.

messense avatar Jun 14 '21 08:06 messense