DanielStutzbach / blist

A list-like type with better asymptotic performance and similar performance on small lists
Other
310 stars 36 forks source link

Improved instance of blist #95

Open BR1py opened 3 years ago

BR1py commented 3 years ago

Hello, this is not an issue but an improvement.

When instance the blist with: a=blist([1,2,3]) when building large nested lists I loose a lot of time because we instance a list and afterwards the blist object (we have to instance two objects).

It would be better to use: a=blist(1,2,3,4) and in case somebody want's to put a list he must use: mylist=[1,2,3,4] a=blist(*mylist)

I know the impact is very high because this is a change in the interface which makes the old codes of the users incompatible. But maybe you can provide a second blist class (blist2) in the package which uses this way of instancing.

I like your package a lot!