[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
Re: [ddlm-group] Wrapping up the elide discussion
- To: jwest@rcsb.rutgers.edu, Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
- Subject: Re: [ddlm-group] Wrapping up the elide discussion
- From: "Herbert J. Bernstein" <yaya@bernstein-plus-sons.com>
- Date: Sun, 30 Jan 2011 11:04:10 -0500 (EST)
- In-Reply-To: <4D457772.1000909@rcsb.rutgers.edu>
- References: <AANLkTi=ATdNovWFiecEwDrbtMdTwZ7guvYuBCGrdnb-i@mail.gmail.com><8F77913624F7524AACD2A92EAF3BFA54166D7D1EDE@SJMEMXMBS11.stjude.sjcrh.local> <4D404DAA.8070804@mcmaster.ca><a06240802c96600c48956@[192.168.2.102]><8F77913624F7524AACD2A92EAF3BFA54166D7D1EE1@SJMEMXMBS11.stjude.sjcrh.local> <a06240800c9668e1faa7c@[192.168.2.102]><8F77913624F7524AACD2A92EAF3BFA54166D7D1EE8@SJMEMXMBS11.stjude.sjcrh.local> <a06240802c9674292646e@[192.168.2.102]><8F77913624F7524AACD2A92EAF3BFA54166D7D1EEB@SJMEMXMBS11.stjude.sjcrh.local> <4D41C6E7.2040109@rcsb.rutgers.edu><8F77913624F7524AACD2A92EAF3BFA54166D7D1EEF@SJMEMXMBS11.stjude.sjcrh.local> <a06240800c967b204830b@[192.168.2.102]><8F77913624F7524AACD2A92EAF3BFA54166D7D1EF0@SJMEMXMBS11.stjude.sjcrh.local> <alpine.BSF.2.00.1101282147550.61818@epsilon.pair.com><a06240800c96b125695f2@[192.168.2.102]><4D457772.1000909@rcsb.rutgers.edu>
I think I am voting to allow any and all of the following to represent '''my verbatim text''' """'''my verbatim text'''""" ''''\ '\ '\ my verbatim text'\ '\ '\ ''' '''''\ 'my verbatim text''\ '\ ''' etc. ===================================================== Herbert J. Bernstein, Professor of Computer Science Dowling College, Kramer Science Center, KSC 121 Idle Hour Blvd, Oakdale, NY, 11769 +1-631-244-3035 yaya@dowling.edu ===================================================== On Sun, 30 Jan 2011, John Westbrook wrote: > I concur with Herbert and opt for the option F of those under consideration. > > I would appreciate an example of how to embed a triple quoted text section > verbatim within a triple quoted section. This is an issue for dictionary > examples. Does the proposal include both """ and ''' so that the string > """'''my verbatim text'''""" is treated as '''my verbatim text'''? > > John > > On 1/30/11 9:00 AM, Herbert J. Bernstein wrote: >>> If the choice is only between F and F', I vote for F. >>> >>> To clarify: >>> >>> James' F' proposal was: >>> >>> "The datavalue is obtained from the triple-quoted string in two steps: >>> (1) All instances of<backslash><eol> are removed from the string >>> where the<backslash> is not preceded by another<backslash> >>> (2) All other instances of<backslash><eol> are replaced with<eol> >>> >>> "This means that a sequence of n backslashes followed by newline is >>> replaced by a sequence of n-1 backslashes followed by newline, except >>> if there is one backslash before the newline, in which case both >>> newline and backslash are removed. Triple quote sequences are elided >>> by inserting a<backslash><eol> sequence between<delimiter> >>> characters to break up the triple delimiter sequence. Note also that >>> backslash has no special meaning if not in a sequence finishing with >>> <eol>." >>> >>> Simon's F proposal was >>> >>> "If you're looking to base CIF extensions on established mechanisms, >>> why not adopt >>> the minimal \(newline) and \\ escape sequences, which in essence are >>> the same as >>> the established CIF line-folding protocol (just dropping the initial >>> \ following the opening >>> delimiter and formalising the protocol as an inherent part of the >>> spec). Afterall, I beleive you >>> have already been using it, or at least interpreted it, as a means to >>> escape 'semicolon delimiters' within >>> semicolon-delimited values (I seem to recall discussions that >>> identified an issue with the published 'trip tests' >>> relating to line folding)." >>> >>> Under Simon's F proposal >>> >>> """\\\ >>> """ >>> >>> would mean one backslash (no trailing new line) >>> >>> and >>> >>> """\\ >>> """ >>> >>> would mean one backslash followed by a newline >>> >>> and >>> >>> """\\ >>> >>> """ >>> >>> would mean one backslash followed by two newlines >>> >>> while under James' F' >>> >>> """\\\ >>> """ >>> >>> would mean two backslashes (no trailing newline) >>> >>> and >>> >>> """\\ >>> """ >>> >>> would mean one backslash (no trailing newline) >>> >>> and >>> >>> """\\ >>> >>> """ >>> >>> would mean one backslash followed by a newline >>> >>> >>> While either proposal could, of course, be implemented, to me, >>> Simon's proposal is seems complete and more consistent with >>> common programming practice in handling backslash elides >>> >>> I agree with James that it is time to make a choice and move >>> on. I just hope, if we cannot follow complete Python >>> practice, we at least take F, the proposal that is more >>> consistent with Python practice. >>> > > > [*** Terminated Message ***] > _______________________________________________ ddlm-group mailing list ddlm-group@iucr.org http://scripts.iucr.org/mailman/listinfo/ddlm-group
Reply to: [list | sender only]
- References:
- Re: [ddlm-group] DDLm aliases (subject changed) (James Hester)
- Re: [ddlm-group] DDLm aliases (subject changed). . (Bollinger, John C)
- Re: [ddlm-group] DDLm aliases (subject changed). . (David Brown)
- Re: [ddlm-group] DDLm aliases (subject changed). . (Herbert J. Bernstein)
- Re: [ddlm-group] DDLm aliases (subject changed). .. . (Bollinger, John C)
- Re: [ddlm-group] DDLm aliases (subject changed). .. . (Herbert J. Bernstein)
- Re: [ddlm-group] DDLm aliases (subject changed). .. .. . (Bollinger, John C)
- Re: [ddlm-group] DDLm aliases (subject changed). .. .. . (Herbert J. Bernstein)
- Re: [ddlm-group] DDLm aliases (subject changed). .. .. .. . (Bollinger, John C)
- Re: [ddlm-group] DDLm aliases (subject changed). .. .. .. . (John Westbrook)
- Re: [ddlm-group] DDLm aliases (subject changed). .. .. .. .. . (Bollinger, John C)
- Re: [ddlm-group] DDLm aliases (subject changed). .. .. .. .. . (Herbert J. Bernstein)
- Re: [ddlm-group] DDLm aliases (subject changed). .. .. .. .. .. . (Bollinger, John C)
- Re: [ddlm-group] DDLm aliases (subject changed). .. .. .. .. .. . (Herbert J. Bernstein)
- Re: [ddlm-group] Wrapping up the elide discussion (Herbert J. Bernstein)
- Re: [ddlm-group] Wrapping up the elide discussion (John Westbrook)
- Prev by Date: Re: [ddlm-group] Wrapping up the elide discussion
- Next by Date: Re: [ddlm-group] DDLm aliases (subject changed). .. .. .. .. .
- Prev by thread: Re: [ddlm-group] Wrapping up the elide discussion
- Next by thread: Re: [ddlm-group] Wrapping up the elide discussion
- Index(es):