This wiki is in the process of being archived due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies. Edits are discouraged.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

Other syntax ideas and feature ideas for Python3.0 .

Contents

  1. declaring parameter and variable types
  2. script to translate python source from one version to one other
  3. Different regular expressions modules for bytes and unicode text
  4. New binary operator symbols d e `
  5. Optional Static Typing / Adaptation
  6. Lambda / Anonymous Methods / Closures
  7. Print as builtin instead of a statement
  8. ".." Sequences, Custom Infix Operators
  9. Improved default value logic for Dictionaries
  10. Better boolean logic
  11. Disallow calling class methods from instances
  12. Simplify the syntax for raising exceptions
  13. Fix implementation of in-place operators
  14. Remove the distinction between data and non-data decriptors
  15. Reconsider the inclusion of __slots__ or re-evaluate its implementation
  16. Extra operators for strings and lists
  17. Move rarely-used builtins to the library
  18. Don't remove callable()
  19. Make API of set, list, dict more consistent
  20. Make copy and deepcopy built-ins, replace copy methods by __copy__
  21. Don't remove cmp() and __cmp__
  22. Builtin Literal for sets
  23. Make extended function call syntax more iterator friendly
  24. Require __iter__() for DictMixin instead of keys()
  25. Raise the level of os module functions
  26. Parameterize functions that hardcode stdout or stderr
  27. Module interface
  28. Stronger Distinction between Tuples & Lists
  29. Unifying generators
  30. Replace Integer Masks with Sets
  31. Replace abs() with | |
  32. Require Parens for Tuple Definition
  33. Remove [<listcomp>] syntax in favor of list(<genexp>) syntax
  34. Move builtins to be methods on the types they apply to:
  35. Default to assign class object rather than class reference
  36. Unicode identifier
  37. Remove support for complex numbers
  38. Reserve some keywords for futur extensions
  39. Simplify the filename search when importing
  40. Increment operator

declaring parameter and variable types

It may be easier, reduce bugs, offers intelli-sense like in Microsoft Visual Studio. All of that could reduce development-time.

script to translate python source from one version to one other

does any script (will) exists, to translate code, form python 2.3 to python 2.4 or from python 2.3 to 2.4?

Different regular expressions modules for bytes and unicode text

I do not allways understand whether re module is designed for text or binary? The struct module for interfacing with binary files, or network datagrams might be improved by adding some of the regular expressions facilities, such as split.

Two modules like re might be a good thing, one binary oriented, and the other unicode oriented: * one for binary data, with some of the re and struct facilities adapted to bytes. ... with eventually stuff like reading a two bytes encoded size, then a buffer from the previous size ... * one for unicode/text regular expression should be in some way text/unicode oriented.... like ICU portable one.

For example, the ICU one provide the following patterns:

related pep:

New binary operator symbols d e `

these operators d e ` should be added to the language having the following meaning:

this should improve readibility (and make language more accessible to beginners).

This should be an evolution similar to the digraphe and trigraph (digramme et trigramme) from C and C++ languages. In C, "<%" or "??<" mean "{" such as.

gcc -trigraphs a.c

??=include <stdio.h>

int main(int argc, char *argv ??( ??) )
        ??<
        printf ("hello world\n");
        ??>

See also: * The <> operator: use != instead http://www.python.org/peps/pep-3000.html#id54


From an aesthetic point of view, I would very much