Open microbit-mark opened 5 years ago
It was present in micro:bit MicroPython v0.9 (upstream MicroPython v1.7) and not included in micro:bit MicroPython v1.0.0 (upstream MicroPython v1.9), as the define flag was probably introduced after upstream v1.7.
MicroPython v1.7-9-gbe020eb on 2016-04-18; micro:bit with nRF51822
Type "help()" for more information.
>>> a = 'hello'
>>> a.
find rfind index rindex
join split rsplit startswith
endswith strip lstrip rstrip
format replace count partition
rpartition lower upper isspace
isalpha isdigit isupper islower
>>> a.
MicroPython v1.9.2-34-gd64154c73 on 2017-09-01; micro:bit v1.0.0 with nRF51822
Type "help()" for more information.
>>> a = 'hello'
>>> a.
find rfind index rindex
join split rsplit startswith
endswith strip lstrip rstrip
format replace count lower
upper isspace isalpha isdigit
isupper islower
>>> a.
microbit-support:20460
User reports code that previously worked using partition, no longer functions.
It appears that this was deactivated in the port to v1.0.0
https://github.com/bbcmicrobit/micropython/blob/e10a5ffdbaf1cc40a82a665d79343c7b6b78d13b/inc/py/mpconfig.h#L709
User has found a workaround that uses a split instead.