From: Markus Jais Date: 2001-12-05T18:44:23+09:00 Subject: [ruby-talk:27539] Re: ANN: REXML 1.1b1 On Wed, 05 Dec 2001 02:50:22 +0100, Sean Russell wrote: > David Alan Black wrote: > >>> I have one more request for comments: it has been suggested that the >>> default behavior of write() should be to *not* indent the output, >>> rather than to *do* indent the output, which is the current behavior. >>> REXML > .. >> Could you have both a (raw) write and a pretty_print or some such >> thing? > > That is the way it is right now. If you want unformatted output, you > pass write() a "-1". Otherwise, it formats the output. > > If people want the behavior reversed, by default the output would be > written unformatted. If you wanted formatting, you'd do something like > pass write() "0", or some other number greater than 0. In effect, I'd > just change the default value of "indent" from 0 to -1. > I think the default should be to *not* indent the output. I would find it most intuitive, when you can pass the level of indentation, that is doc.write($stdout, 0) # no indentation (zero spaces) doc.write($stdout, 1) # 1 space indentation doc.write($stdout, 5) # 5 spaces indentation markus