return2ozma@lemmy.world to Technology@lemmy.worldEnglish · 21 hours agoDeparting Meta staffer posts biting anti-AI video internally amid mass layoffswww.motherjones.comexternal-linkmessage-square53fedilinkarrow-up1424arrow-down16
arrow-up1418arrow-down1external-linkDeparting Meta staffer posts biting anti-AI video internally amid mass layoffswww.motherjones.comreturn2ozma@lemmy.world to Technology@lemmy.worldEnglish · 21 hours agomessage-square53fedilink
minus-squaredreugeworst@lemmy.mllinkfedilinkEnglisharrow-up3·12 hours agoas someone who would also reach for a state machine when doing simple parsing… what’s the better alternative in python?
minus-squarelectricleopard@lemmy.worldlinkfedilinkEnglisharrow-up1·5 hours agoA loop and a data structure to hold the result of parsing. The data structure will have a state you can interrogate. No need to build a state machine to explicitly name each way the parsing can develop.
minus-squaredreugeworst@lemmy.mllinkfedilinkEnglisharrow-up1·48 minutes agothat’s what I’d do for a state machine implementation too
as someone who would also reach for a state machine when doing simple parsing… what’s the better alternative in python?
A loop and a data structure to hold the result of parsing. The data structure will have a state you can interrogate. No need to build a state machine to explicitly name each way the parsing can develop.
that’s what I’d do for a state machine implementation too