Nick Coghlan avatar Nick Coghlan committed abc936d

Add unicode features demo

Comments (0)

Files changed (3)

talks/2012-pyconindia/py3.3-highlights/demo-commands/unicode-features.txt

+~/devel/py3k/python
+--
+u"This works again in 3.3"
+'ß'.casefold()
+"\N{LATIN CAPITAL LETTER OI}\N{LATIN CAPITAL LETTER GHA}"
+import unicodedata
+unicodedata.lookup("LATIN CAPITAL LETTER A WITH MACRON AND GRAVE")

talks/2012-pyconindia/py3.3-highlights/demo-js/unicode-features.js

+{
+  "events": [
+    {
+      "act": "OPEN", 
+      "size": [
+        58, 
+        15
+      ], 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "PAUSE", 
+      "duration": 0.20903301239013672
+    }, 
+    {
+      "act": "WRITE", 
+      "data": "Python 3.3.0rc3+ (default:f1094697d7dc, Sep 29 2012, 04:55:01) \r\n[GCC 4.7.2 20120921 (Red Hat 4.7.2-2)] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n\u001b[?1034h>>> ", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "ECHO", 
+      "data": "u\"This works again in 3.3\"", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "READ", 
+      "data": "\r", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "WRITE", 
+      "data": "\r\n'This works again in 3.3'\r\n>>> ", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "ECHO", 
+      "data": "'\u00df'.casefold()", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "READ", 
+      "data": "\r", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "WRITE", 
+      "data": "\r\n'ss'\r\n>>> ", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "ECHO", 
+      "data": "\"\\N{LATIN CAPITAL LETTER OI}\\N{LATIN CAPITAL LETTER GHA}\"", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "READ", 
+      "data": "\r", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "WRITE", 
+      "data": "\r\n'\u01a2\u01a2'\r\n>>> ", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "ECHO", 
+      "data": "import unicodedata", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "READ", 
+      "data": "\r", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "WRITE", 
+      "data": "\r\n>>> ", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "ECHO", 
+      "data": "unicodedata.lookup(\"LATIN CAPITAL LETTER A WITH MACRON AND GRAVE\")", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "READ", 
+      "data": "\r", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "WRITE", 
+      "data": "\r\n'\u0100\u0300'\r\n>>> ", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "READ", 
+      "data": "\u0004", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "WRITE", 
+      "data": "\r\n", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "PAUSE", 
+      "duration": 0.002813100814819336
+    }, 
+    {
+      "act": "WRITE", 
+      "data": "\u001b]0;ncoghlan@lancre:~/devel/misc/talks/2012-pyconindia/py3.3-highlights/demo-js\u0007$ ",
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "READ", 
+      "data": "\u0004", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "WRITE", 
+      "data": "<Press Enter to close demo>\r\n",
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }, 
+    {
+      "act": "CLOSE", 
+      "term": "0a49203e891240fcafb467279e1bd72f"
+    }
+  ]
+}

talks/2012-pyconindia/py3.3-highlights/talk.md

 * Migrated to importlib - PEP 302 is finally Final!
 * Import system is now defined in the language reference
 * import statement, runpy, pkgutil now use same code
+* Interpreter specific details set via ``sys.implementation``
 * Per-module import locks should reduce import lock contention
+
+----
+
+# Namespace packages
+
 * Full namespace package support
 * ``__init__.py`` files are now optional
 * if no ``__init__.py``, whole sys.path is searched for portions
 
 ----
 
-# Virtual Environments (Demo)
+# Testing improvements
 
-<div id="pias-virtual-environments-player" class="pias_player"></div>
+* ``unittest.mock`` now available
+* ``msg`` parameter for ``assertRaises``, etc
+
+----
+
+# Introspection improvements
+
+* Callable signatures: ``inspect.signature``
+* Closure state: ``inspect.getclosurevars``
+* Generator state: ``inspect.getgeneratorstate``
 
 ----
 
 
 ----
 
-# Abstract base classes
+# Data structures (continued)
 
+* sequence reference docs rewritten
 * collections.abc created
 * range now supports equality checks (based on contents)
 * list and bytearray now provide copy() and clear() methods
 
 ----
 
-# Introspection improvements
-
-* Callable signatures: ``inspect.signature``
-* Closure state: ``inspect.getclosurevars``
-* Generator state: ``inspect.getgeneratorstate``
-
-----
-
 # Dynamic context management
 
 * ``contextlib.ExitStack``
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.