Top "Syntax" questions

Syntax refers to the actual language elements and symbols themselves.

How to include a quote in a raw Python string

Consider: >>> r"what"ever" SyntaxError: invalid syntax >>> r"what\"ever" 'what\\"ever' So how …

python syntax
Why is NULL undeclared?

I have a problem with this struct contructor when I try to compile this code: typedef struct Node { Node( int …

c++ syntax nodes
What is :: (double colon) in Python when subscripting sequences?

I know that I can use something like string[3:4] to get a substring in Python, but what does the 3 mean …

python syntax slice
YAML: Do I need quotes for strings in YAML?

I am trying to write a YAML dictionary for internationalisation of a Rails project. I am a little confused though, …

syntax yaml quotes
Putting an if-elif-else statement on one line?

I have read the links below, but it doesn't address my question. Does Python have a ternary conditional operator? (the …

python if-statement syntax
How to query nested objects?

I have a problem when querying mongoDB with nested objects notation: db.messages.find( { headers : { From: "[email protected]" } } ).count() 0 …

mongodb syntax nested mongodb-query bson
Using unset vs. setting a variable to empty

I'm currently writing a bash testing framework, where in a test function, both standard bash tests ([[) as well as predefined …

bash variables syntax
In Ruby, how do I skip a loop in a .each loop, similar to 'continue'

In Ruby, how do I skip a loop in a .each loop, similar to continue in other languages?

ruby loops syntax iteration
Is there a difference between `continue` and `pass` in a for loop in python?

Is there any significant difference between the two python keywords continue and pass like in the examples for element in …

python syntax continue
How do I select an element that has a certain class?

My understanding is that using element.class should allow for a specific element assigned to a class to receive different "…

html css syntax css-selectors