Learn English – What does the idiom “batteries not included” mean

idiomsphrasesterminology

In a comment on a Stack Overflow answer to my question, somebody said that "it is a very 'batteries not included' approach":

it doesn't look like there's any easy way to make a strict RFC 4627-compliant parser using just the builtin modules. In principle you could write your own parser (perhaps using Lex/Yacc/Flex/Bison), but that's a very "batteries not included" approach (and I'm not even sure how those tools integrate with Python, if at all).

I searched its meaning but ended up finding that the phrase was the name of a movie and a book. I would like to know what it means in the context and how it is often used. Many Thanks.

Best Answer

"Batteries not included" is a message you might find on the packaging of an electrically powered toy. Essentially it means that you should not expect the toy to work straight out of the box, and that you have to provide an essential component yourself to power it, namely the batteries.

So in this metaphorical context, the comment seems to be suggesting Python's json module does not provide the parser you are looking for, and you might have to put in a significant amount of extra effort yourself to provide what is missing, so as to get the whole thing to work as you expect.