Skip to content

uarray extend doesn't accept an iterable #7408

@hlovatt

Description

@hlovatt

The extend method of a uarray doesn't accept an iterable only a buffer. Documentations says it should be an iterable and the constructor accepts an iterable and therefore would expect extend to accept an iterable.

EG:

MicroPython v1.14-68-gd4b45898f on 2021-02-18; PYBv1.1 with STM32F405RG
Type "help()" for more information.
>>> from uarray import array
>>> a=array('b',[1,2,3])
>>> a.extend([4,5,6])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: object with buffer protocol required

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests, new feature implementationspy-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