Stefan Ram ha scritto:
r...@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
translation services are gonna interpret line breaks as

   I just beefed up my posting program to replace "gonna".

   Now I won't come across like some street thug, but rather
   as a respectable member of human society!

# replace complete words
replacements =\
{ rb'kind of': b'kind of',
   rb'trying to': b'trying to',
   rb'got to': b'got to',
   rb'gonna': b'going to',
   }
lines =\
[ re.sub( rb"\b(" + b"|".join( replacements.keys() ) + rb")\b",
     lambda x: replacements[ x.group() ], line )
   if len( line )and line[ 0 ]not in b'>|' else line for line in lines ]


I present to you the brutality to which your posts are subjected:

   for(d = s = pCLipb; *s != TEXT('\0'); s++)
   {
      if(d == pCLipb)
      {
         if(*s != TEXT(' ') && *s != TEXT('\n') && *s != TEXT('\r'))
            *d++ = *s;
      }
      else if(*s == TEXT(' ') || *s == TEXT('\n') || *s == TEXT('\r'))
      {
         if(d[-1] != TEXT(' '))
            *d++ = TEXT(' ');
      }
      else
         *d++ = *s;
   }
   *d = TEXT('\0');

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to