Syntax across languages

Tim Roberts timr at probo.com
Tue Oct 25 02:36:23 EDT 2005


bearophileHUGS at lycos.com wrote:

>This post comes from a boring morning, if you are busy ignore this.
>This post is only for relaxed people.
>
>I've found this page, "Syntax Across Languages", it contains many
>errors and omissions, but it's interesting.
>http://merd.sourceforge.net/pixel/language-study/syntax-across-languages.html
>
>Compared to the other languages Python comes out rather well, in quick
>scan only few things look better in other languages (usually all/most
>things are possible in all languages, so it's often just a matter of
>brevity, elegance, etc):
>
>- Nestable Pascal-like comments (useful): (* ... *)

That's only meaningful in languages with begin-comment AND end-comment
delimiters.  Python has only begin-comment.  Effectively, you CAN nest
comments in Python:


  cool = 17
  
  # The following section of code has been commented out.
  #
  # call_function( cool )
  #
  # # This would be neater if I had a real-life example.
  # # As it is, it looks silly.
  #
  # print "New result", cool

  print "All done"
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list