Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
821b7f22
Commit
821b7f22
authored
Sep 3, 2015
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py: Use mp_not_implemented consistently for not implemented features.
parent
25afc7da
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
py/argcheck.c
+1
-2
1 addition, 2 deletions
py/argcheck.c
py/objarray.c
+1
-2
1 addition, 2 deletions
py/objarray.c
py/objstr.c
+2
-3
2 additions, 3 deletions
py/objstr.c
py/objstrunicode.c
+1
-2
1 addition, 2 deletions
py/objstrunicode.c
py/objtuple.c
+1
-2
1 addition, 2 deletions
py/objtuple.c
with
6 additions
and
11 deletions
py/argcheck.c
+
1
−
2
View file @
821b7f22
...
...
@@ -146,7 +146,6 @@ NORETURN void mp_arg_error_terse_mismatch(void) {
#if MICROPY_CPYTHON_COMPAT
NORETURN
void
mp_arg_error_unimpl_kw
(
void
)
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_NotImplementedError
,
"keyword argument(s) not yet implemented - use normal args instead"
));
mp_not_implemented
(
"keyword argument(s) not yet implemented - use normal args instead"
);
}
#endif
This diff is collapsed.
Click to expand it.
py/objarray.c
+
1
−
2
View file @
821b7f22
...
...
@@ -365,8 +365,7 @@ STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value
}
else
if
(
MP_OBJ_IS_TYPE
(
index_in
,
&
mp_type_slice
))
{
mp_bound_slice_t
slice
;
if
(
!
mp_seq_get_fast_slice_indexes
(
o
->
len
,
index_in
,
&
slice
))
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_NotImplementedError
,
"only slices with step=1 (aka None) are supported"
));
mp_not_implemented
(
"only slices with step=1 (aka None) are supported"
);
}
if
(
value
!=
MP_OBJ_SENTINEL
)
{
#if MICROPY_PY_ARRAY_SLICE_ASSIGN
...
...
This diff is collapsed.
Click to expand it.
py/objstr.c
+
2
−
3
View file @
821b7f22
...
...
@@ -391,8 +391,7 @@ STATIC mp_obj_t bytes_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
if
(
MP_OBJ_IS_TYPE
(
index
,
&
mp_type_slice
))
{
mp_bound_slice_t
slice
;
if
(
!
mp_seq_get_fast_slice_indexes
(
self_len
,
index
,
&
slice
))
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_NotImplementedError
,
"only slices with step=1 (aka None) are supported"
));
mp_not_implemented
(
"only slices with step=1 (aka None) are supported"
);
}
return
mp_obj_new_str_of_type
(
type
,
self_data
+
slice
.
start
,
slice
.
stop
-
slice
.
start
);
}
...
...
@@ -975,7 +974,7 @@ mp_obj_t mp_obj_str_format(mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kwa
arg
=
key_elem
->
value
;
}
if
(
*
lookup
)
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_NotI
mplemented
Error
,
"attributes not supported yet"
)
)
;
mp_not_i
mplemented
(
"attributes not supported yet"
);
}
vstr_free
(
field_name
);
field_name
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
py/objstrunicode.c
+
1
−
2
View file @
821b7f22
...
...
@@ -178,8 +178,7 @@ STATIC mp_obj_t str_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
mp_obj_t
ostart
,
ostop
,
ostep
;
mp_obj_slice_get
(
index
,
&
ostart
,
&
ostop
,
&
ostep
);
if
(
ostep
!=
mp_const_none
&&
ostep
!=
MP_OBJ_NEW_SMALL_INT
(
1
))
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_NotImplementedError
,
"only slices with step=1 (aka None) are supported"
));
mp_not_implemented
(
"only slices with step=1 (aka None) are supported"
);
}
const
byte
*
pstart
,
*
pstop
;
...
...
This diff is collapsed.
Click to expand it.
py/objtuple.c
+
1
−
2
View file @
821b7f22
...
...
@@ -183,8 +183,7 @@ mp_obj_t mp_obj_tuple_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
if
(
MP_OBJ_IS_TYPE
(
index
,
&
mp_type_slice
))
{
mp_bound_slice_t
slice
;
if
(
!
mp_seq_get_fast_slice_indexes
(
self
->
len
,
index
,
&
slice
))
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_NotImplementedError
,
"only slices with step=1 (aka None) are supported"
));
mp_not_implemented
(
"only slices with step=1 (aka None) are supported"
);
}
mp_obj_tuple_t
*
res
=
mp_obj_new_tuple
(
slice
.
stop
-
slice
.
start
,
NULL
);
mp_seq_copy
(
res
->
items
,
self
->
items
+
slice
.
start
,
res
->
len
,
mp_obj_t
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment