[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Ruby, python, perl, ...
From:       "Jason Voegele" <jason () jvoegele ! com>
Date:       2002-04-03 15:00:45
[Download RAW message or body]

>> Ruby has that too...try it out. :)
> 
> When I try this(in irb), the behavior that seems to actually be 
> happening is that:
> 
> puts "hello"  " "  "world"
> 
> # prints out "hello world\n"
> 
> So that something like:
> 
> """hello world"""
> 
> is really being seen as 
> 
> "" + "hello world" + ""

You've seen through my smoke and mirrors. ;)

Anyway, the more important point is that Ruby strings are multiline, so you 
get the same behavior as you would in Python using """ regardless of which 
quoting character(s) you use.

Jason Voegele


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic