PEP Request: Advanced Data Structures
MRAB
python at mrabarnett.plus.com
Sat Jul 16 20:38:39 EDT 2016
On 2016-07-17 01:10, Terry Reedy wrote:
> On 7/16/2016 6:14 PM, shrey.desai at gmail.com wrote:
>> I have found it slightly frustrating that Python does not have
>> built-in support for advanced data structures (Linked Lists,
>
> You and I have different ideas of 'advanced data structures' ;-). To
> me, linked list are limited structures used in functional programming to
> make mutable structure from immutable-except-on-creation cells. In any
> case, one can easily use tuples to create branching structures. Tuples
> and lists containing tuples and lists are routine in python programming.
> Wrapping such usage in a LinkedList class is optional -- and unusual.
>
They're the kind of things I'd write when using C, but, then, C is
missing a lot of stuff! :-)
>> Stacks/Queues,
>
> Nearly two decades ago, I promoted the addition of the list.pop method
> as the inverse of list.append, in order to make lists easily usable as
> stacks. This is routine in python code today.
>
> collections.deque instances are advanced data structures that can be
> used as stacks, queues, or both, at either end. The class has tests
> that I presume are rigorous.
>
>> BST)
>
> British Summer Time? (Suggestion from Google)
>
Binary search tree.
Given that Python has dict, there's not much need for a binary search tree.
[snip]
More information about the Python-list
mailing list