• 5 Posts
  • 28 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2023

help-circle



  • Thanks for sharing this. I took the time to read through the documentation of the re module. Here’s my review of the functions.

    Useful:

    • re.finditer returns an iterator over all Match objects
    • re.search returns the first Match object or None if there are no matches.
    • r'' use raw strings for patters so you don’t have to worry about backslashes
    • the optional flags argument modifies the behaviour (case insensitive, multiline)

    Utility:

    • re.sub replace each match in the string
    • re.split split a string by a regular expression

    The Match object:

    • match.groups(0) returns the portion of text matched by the pattern
    • match.groups(1) returns the first capturing group
    • match.groups(2) returns the second capturing group, and so on

    I don’t understand why these exist:

    • re.match like search, but only matches at the beginning of the string. why not just use ‘^’ or ‘\A’ in the pattern you pass to ‘search’?
    • re.fullmatch like ‘search’, but only if the full string matches. Why not just use ‘\A’ and ‘\Z’ in the pattern you pass to ‘search’?
    • re.findall Returns all matches. It seems like a shitty version of ‘finditer’. The function has three different return types which depend on the pattern you pattern you pass to the function. Who wants to work with that?






  • As a man: Prepare to be rejected over and over, to feel disposible and useless, unwanted and nobody likes you and you will never be as good as other men and you might as well end it now.

    As a woman: Prepare to meet men who have the biggest mommy issues, to be called an entitled bitch and everybody who likes you will promptly abandon you once they figure out who you really are.

    These apps prey on your worst anxieties about yourself, and then sell you the remedy: An outrageously expensive subscription to skip past the chaff and find your true life mate. Except, then you’d leave the platform, and you’d stop paying up. Match group is busy gobbling up every dating app they can get their hands on and they will stop at nothing to turn them all into the same steaming pile of shit.





  • alyth@lemmy.worldtoich_iel@feddit.orgich_iel
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    6 months ago

    Ich habe letzte Woche Urlaub gemacht. Mit 49€-Ticket alte Freunde und Familie besucht, für lau auf deren Couch gepennt (ich habe paar Mal Essen ausgegeben), während den Zugfahrten ein Buch duchgelesen und Veranstaltungen in meiner Heimatstadt besucht.






  • Wouldn’t mixing with a wide variety of ages from 18 to 118 be better?

    You will work in the NHS or the firefighters and so on, so you will certainly engage with community members of all ages and from all wakes of life. For a year of mandatory service that everybody is meant to complete, 18 is arguably the best time to do it.

    slavery

    When you walk on a public road past a hospital do you think to yourself “they stole my money to build this”? You have rights and duties as a citizen. Your service benefits the community as a whole.

    Also why is the stick to make people do it a fine (so that the rich will just pay if their kids don’t want to do it)?

    I fully agree with you on this point