return2ozma@lemmy.world to Technology@lemmy.worldEnglish · 4 months agoDeparting Meta staffer posts biting anti-AI video internally amid mass layoffswww.motherjones.comexternal-linkmessage-square66linkfedilinkarrow-up11arrow-down10cross-posted to: artificial_intel@lemmy.ml
arrow-up11arrow-down1external-linkDeparting Meta staffer posts biting anti-AI video internally amid mass layoffswww.motherjones.comreturn2ozma@lemmy.world to Technology@lemmy.worldEnglish · 4 months agomessage-square66linkfedilinkcross-posted to: artificial_intel@lemmy.ml
minus-squaredreugeworst@lemmy.mllinkfedilinkEnglisharrow-up0·4 months 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-up0·4 months 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-up0·4 months 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