Skip to content

deque bug ? #13495

@pidou46

Description

@pidou46

from doc:

class collections.deque(iterable, maxlen[, flags])[¶](https://docs.micropython.org/en/latest/library/collections.html#collections.deque)

    Deques (double-ended queues) are a list-like container that support O(1) appends and pops from either side of the deque. New deques are created using the following arguments:

            iterable must be the empty tuple, and the new deque is created empty.

            maxlen must be specified and the deque will be bounded to this maximum length. Once the deque is full, any new items added will discard items from the opposite end.

            The optional flags can be 1 to check for overflow when adding items.

from MP prompt:

MPY: soft reboot
MicroPython v1.22.1 on 2024-01-05; Generic ESP32 module with ESP32
Type "help()" for more information.
>>> from collections import deque
>>> b=deque([],100)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: 
>>> 

from CPython prompt:

Python 3.10.11 (C:\Program Files (x86)\Thonny\python.exe)
>>> from collections import deque
>>> b=deque([],100)
>>> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    py-coreRelates to py/ directory in source

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy