Skip to content
Advertisement

Tag: keyword

What does this “.children” attribute do?

I’m trying to understand a Key-Bigram extractor’s working and I cannot understand what does the following block of code do. Here is the source code. Everything else is workin fine and I understood well, however I can not understand what child for child in possible_words.children does. Answer token.children uses the dependency parse to get all tokens that directly depend on

What is the difference between function and keyword/statements?

I’ve seen ‘del’ being referred to as a keyword and as a statement. Apparently, it is not considered a function: Python has a del statement (keyword) to delete objects, not a del function. https://tutorial.eyehunts.com/python/del-function-in-python-code/ I looked up the definition of a function in Python and it says: In Python, a function is a group of related statements that performs a

`final` keyword equivalent for variables in Python?

I couldn’t find documentation on an equivalent of Java’s final in Python, is there such a thing? I’m creating a snapshot of an object (used for restoration if anything fails); once this backup variable is assigned, it should not be modified — a final-like feature in Python would be nice for this. Answer Having a variable in Java be final

Advertisement