Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4810793

Add support for python's triple-quote mechanism for coding multi-line strings

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.1
    • specification
    • x86
    • windows_2000

      Name: rmT116609 Date: 01/30/2003


      DESCRIPTION OF THE PROBLEM :
      Python support a triple-quote mechanism that makes it easy to embed multi-line strings in code. For example:

      public void testme()
      {
       // Current java way
       String test =
       "Multi-line text gets added to the variable," + '\n'
       + "including carriage returns. This process continues"
      + '\n'
       + "until and ending triple quote."

       // Triple-quote way
       test =
      """Multi-line text gets added to the variable,
      including carriage returns. This process continues
      until and ending triple quote."""
      }


      (Review ID: 180128)
      ======================================================================

            abuckley Alex Buckley
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: