What’s the u prefix in a Python string?

You’re right, see 3.1.3. Unicode Strings. It’s been the syntax since Python 2.0. Python 3 made them redundant, as the default string type is Unicode. Versions 3.0 through 3.2 removed them, but they were re-added in 3.3+ for compatibility with Python 2 to aide the 2 to 3 transition.

What does the “@” symbol do in PowerShell?

PowerShell will actually treat any comma-separated list as an array: So the @ is optional in those cases. However, for associative arrays, the @ is required: Officially, @ is the “array operator.” You can read more about it in the documentation that installed along with PowerShell, or in a book like “Windows PowerShell: TFM,” which … Read more

Printing variables in Python 3.4

The syntax has changed in that print is now a function. This means that the % formatting needs to be done inside the parenthesis:1 However, since you are using Python 3.x., you should actually be using the newer str.format method: Though % formatting is not officially deprecated (yet), it is discouraged in favor of str.format and will most likely be removed from the language in a coming … Read more

What does the “at” (@) symbol do in Python?

An @ symbol at the beginning of a line is used for class, function and method decorators. Read more here: PEP 318: Decorators Python Decorators The most common Python decorators you’ll run into are: @property @classmethod @staticmethod If you see an @ in the middle of a line, that’s a different thing, matrix multiplication. See this answer showing the use of @ as … Read more

Can a URL contain a semicolon and still be valid?

A semicolon is reserved and should only for its special purpose (which depends on the scheme). Section 2.2: Many URL schemes reserve certain characters for a special meaning: their appearance in the scheme-specific part of the URL has a designated semantics. If the character corresponding to an octet is reserved in a scheme, the octet must be … Read more

What are the distinctions between the various symbols (*,&, etc) combined with parameters?

To understand this you’ll first need to understand pointers and references. I’ll simply explain the type declaration syntax you’re asking about assuming you already know what pointers and references are. In C, it is said that ‘declaration follows use.’ That means the syntax for declaring a variable mimics using the variable: generally in a declaration … Read more