Re: Python Dialogs

Liste des GroupesRevenir à cl python 
Sujet : Re: Python Dialogs
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.python
Date : 06. May 2024, 14:07:55
Autres entêtes
Organisation : Stefan Ram
Message-ID : <gonna-20240506140618@ram.dialup.fu-berlin.de>
References : 1 2 3 4
ram@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 ]

Date Sujet#  Auteur
2 May 24 * Python Dialogs3Stefan Ram
6 May 24 `* Re: Python Dialogs2Stefan Ram
6 May 24  `- Re: Python Dialogs1Stefan Ram

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal