> On Fri, Jul 26, 2013 at 08:14:56PM +0200, Daniel wrote: >I think it would be convenient if abook would skip spaces and tabs >around the = equal sign when parsing the database. This makes the >database format conform to for example Python's configobj format. This >patch is a first attempt at implementing this. > >Are there any cons with doing this at all? I doubt that people rely on >initial spaces/tabs in a field's data, or could that be the case? >Obviously those would be gone while parsing the datafile. > >Daniel (1): > Allow spaces and tabs around '=' in the database file > > database.c | 10 ++++++++++ > 1 file changed, 10 insertions(+)
I'm also confused about this as well. Atypically, spaces were and still are frowned upon as they require special escape characters within low-level programming languages, hindering comprehension of the source code during reading. (Relative to real programming languages such as C versus Python?) Practicing this method of avoiding using spaces (or not needed spacing) as a building block here or guideline, ABook already allows spaces within the abookdatabase file after the equals sign. (ie. name=My Company Name, Inc.) I strongly speculate adding the space around equals sign within the abookdatabase file may cause significant future problems as well. Seeing Python was created or is supported by many Perl fans, you'd think Python would be more apt to easily handle such trivial feats, especially as rudimentary as this one? This isn't meant to be a derogatory comment, just an observation from my research. (Maybe post a question within a Python user list concerning how to parse files without spaces?) I also speculate you can, in Python, read each char versus depending on a higher level function. It is quite common, a higher level function contains more hiccups or is not streamlined to utilize CPU resources efficiently. The file formating within the abookdatabase seems quite commonly formatted to me. Because of some of the poor engineering choices Python is or has made in the past, I still use the old tried and true Sh/Bash and C here. And, I didn't want to post earlier as I too was stumped about this until reading the previous follow-up message. (ie. Why would somebody writing C, want to change something for an upper-level language or upper-level Python function, when the problem should be solved from the upper-level language?) Hope this helps? In other words, there are many other parsing problems as you program more, such as dealing with field delimiters! ;-) -- Roger http://rogerx.freeshell.org/ ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ Abook-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/abook-devel
