From stappers at stappers.nl Thu Mar 9 13:26:03 2017 From: stappers at stappers.nl (Geert Stappers) Date: Thu, 9 Mar 2017 19:26:03 +0100 Subject: [python-nl] Doc string van een andere functie Message-ID: <20170309182603.GT3943@gpm.stappers.nl> #!/usr/bin/env python # Hoi, # lees a.u.b. verder ... def functie1(): """functie die zijn eigen doc string print""" print functie1.__doc__ return def functie2(): """functie die doc string van andere functie print""" print functie1.__doc__ return def functie3(functienaam): """Wat ik zou willen""" print functienaam.__doc__ return def functie4(functienaam): """Mijn poging om voorbij 'str(object) -> string' te komen""" print repr(functienaam.__doc__) return if __name__ == "__main__": functie1() functie2() functie3('functie2') #functie4('functie2') output = """ functie die zijn eigen doc string print functie die zijn eigen doc string print str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object. """ vraag = """ Wat te doen om voorbij '''str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object. ''' te komen? """ # l l Groeten Geert Stappers -- Leven en laten leven From j at jasper.es Thu Mar 9 15:04:05 2017 From: j at jasper.es (Jasper Spaans) Date: Thu, 9 Mar 2017 21:04:05 +0100 Subject: [python-nl] Doc string van een andere functie In-Reply-To: <20170309182603.GT3943@gpm.stappers.nl> References: <20170309182603.GT3943@gpm.stappers.nl> Message-ID: <6992B3AA-A44C-47F6-94F8-6CF452B7445D@jasper.es> Hoi Geert, > vraag = """ > Wat te doen om voorbij '''str(object) -> string > > Return a nice string representation of the object. > If the argument is a string, the return value is the same object. > ''' te komen? > """ Probeer het eens met functie3(functie2) -- dus zonder aanhalingstekens. Of als je per se iets met een string wil doen, functie3(locals()["functie2"]). Groet, Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From stappers at stappers.nl Thu Mar 9 16:16:59 2017 From: stappers at stappers.nl (Geert Stappers) Date: Thu, 9 Mar 2017 22:16:59 +0100 Subject: [python-nl] Doc string van een andere functie In-Reply-To: <6992B3AA-A44C-47F6-94F8-6CF452B7445D@jasper.es> References: <20170309182603.GT3943@gpm.stappers.nl> <6992B3AA-A44C-47F6-94F8-6CF452B7445D@jasper.es> Message-ID: <20170309211659.GU3943@gpm.stappers.nl> On Thu, Mar 09, 2017 at 09:04:05PM +0100, Jasper Spaans wrote: > > vraag = """ > > Wat te doen om voorbij '''str(object) -> string > > > > Return a nice string representation of the object. > > If the argument is a string, the return value is the same object. > > ''' te komen? > > """ > > Probeer het eens met functie3(functie2) -- dus zonder aanhalingstekens. > Of als je per se iets met een string wil doen, functie3(locals()["functie2"]). Ja, met `locals()["functienaam"]` als parameter kan ik wat het plan is. Dank je wel. #!/usr/bin/env python def functie1(): """functie die zijn eigen doc string print""" print functie1.__doc__ return def functie2(): """functie die doc string van andere functie print""" print functie1.__doc__ return def functie3(functienaam): """ te gebruiken als "help tekst printer." """ print functienaam.__doc__ return if __name__ == "__main__": functie3(locals()['functie2']) # toepassing user_input = 'functie2' functie3(locals()[user_input]) de_gewenste_output = """ functie die doc string van andere functie print functie die doc string van andere functie print """ # l l Groeten Geert Stappers -- Leven en laten leven From douwe at karibu-online.nl Thu Mar 9 16:46:57 2017 From: douwe at karibu-online.nl (Douwe van der Meij) Date: Thu, 9 Mar 2017 22:46:57 +0100 Subject: [python-nl] Doc string van een andere functie In-Reply-To: <20170309182603.GT3943@gpm.stappers.nl> References: <20170309182603.GT3943@gpm.stappers.nl> Message-ID: Hoi Geert, Het moet zijn: *functie3(functie2)* # dus niet als string meegeven maar de functie zelf of: *functie3('functie2')* # zoals je hebt en dan: *def functie3(functienaam):* * print(eval(functienaam).__doc__)* # dit werkt altijd, maar eval is mooi in je code of: *def functie3(functienaam):* * print(globals()[functienaam].__doc__)* # dit werkt niet bij built-in functies Succes! Groet, Douwe. w: www.karibu-online.nl m: 06 5060 4033 2017-03-09 19:26 GMT+01:00 Geert Stappers : > #!/usr/bin/env python > > # Hoi, > > # lees a.u.b. verder ... > > def functie1(): > """functie die zijn eigen doc string print""" > print functie1.__doc__ > return > > def functie2(): > """functie die doc string van andere functie print""" > print functie1.__doc__ > return > > def functie3(functienaam): > """Wat ik zou willen""" > print functienaam.__doc__ > return > > def functie4(functienaam): > """Mijn poging om voorbij 'str(object) -> string' te komen""" > print repr(functienaam.__doc__) > return > > if __name__ == "__main__": > functie1() > functie2() > functie3('functie2') > #functie4('functie2') > output = """ > functie die zijn eigen doc string print > functie die zijn eigen doc string print > str(object) -> string > > Return a nice string representation of the object. > If the argument is a string, the return value is the same object. > """ > > vraag = """ > Wat te doen om voorbij '''str(object) -> string > > Return a nice string representation of the object. > If the argument is a string, the return value is the same object. > ''' te komen? > """ > > # l l > > > Groeten > Geert Stappers > -- > Leven en laten leven > _______________________________________________ > Python-nl mailing list > Python-nl at python.org > https://mail.python.org/mailman/listinfo/python-nl > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stappers at stappers.nl Thu Mar 9 16:54:49 2017 From: stappers at stappers.nl (Geert Stappers) Date: Thu, 9 Mar 2017 22:54:49 +0100 Subject: [python-nl] Doc string van een andere functie In-Reply-To: References: <20170309182603.GT3943@gpm.stappers.nl> Message-ID: <20170309215449.GX3943@gpm.stappers.nl> On Thu, Mar 09, 2017 at 10:46:57PM +0100, Douwe van der Meij wrote: > Hoi Geert, > > *functie3('functie2')* # zoals je hebt > > en dan: > > *def functie3(functienaam):* > * print(eval(functienaam).__doc__)* # dit werkt altijd, maar eval is mooi in je code Die is gaaf! > of: > > *def functie3(functienaam):* > * print(globals()[functienaam].__doc__)* # dit werkt niet bij built-in functies Werkt ook (voor mijn doel) #!/usr/bin/env python def functie1(): """functie die zijn eigen doc string print""" print functie1.__doc__ return def functie2(): """functie die doc string van andere functie print""" print functie1.__doc__ return def functie3(functienaam): """ te gebruiken als "help tekst printer." """ print eval(functienaam).__doc__ print globals()[functienaam].__doc__ return if __name__ == "__main__": functie3('functie2') # toepassing user_input = 'functie2' functie3(user_input) de_gewenste_output = """ functie die doc string van andere functie print functie die doc string van andere functie print functie die doc string van andere functie print functie die doc string van andere functie print """ # l l Dank je wel Groeten Geert Stappers -- Leven en laten leven From douwe at karibu-online.nl Thu Mar 9 16:56:27 2017 From: douwe at karibu-online.nl (Douwe van der Meij) Date: Thu, 9 Mar 2017 22:56:27 +0100 Subject: [python-nl] Doc string van een andere functie In-Reply-To: <20170309215449.GX3943@gpm.stappers.nl> References: <20170309182603.GT3943@gpm.stappers.nl> <20170309215449.GX3943@gpm.stappers.nl> Message-ID: Wel een typo zie ik in mijn comment: eval is *niet* zo mooi in je code.. Maar goed, het werkt wel.. w: www.karibu-online.nl m: 06 5060 4033 Op 9 maart 2017 om 22:54 schreef Geert Stappers : > On Thu, Mar 09, 2017 at 10:46:57PM +0100, Douwe van der Meij wrote: > > Hoi Geert, > > > > *functie3('functie2')* # zoals je hebt > > > > en dan: > > > > *def functie3(functienaam):* > > * print(eval(functienaam).__doc__)* # dit werkt altijd, maar eval > is mooi in je code > > Die is gaaf! > > > > of: > > > > *def functie3(functienaam):* > > * print(globals()[functienaam].__doc__)* # dit werkt niet bij > built-in functies > > Werkt ook (voor mijn doel) > > > #!/usr/bin/env python > > def functie1(): > """functie die zijn eigen doc string print""" > print functie1.__doc__ > return > > def functie2(): > """functie die doc string van andere functie print""" > print functie1.__doc__ > return > > def functie3(functienaam): > """ te gebruiken als "help tekst printer." """ > print eval(functienaam).__doc__ > print globals()[functienaam].__doc__ > return > > if __name__ == "__main__": > functie3('functie2') > # toepassing > user_input = 'functie2' > functie3(user_input) > > de_gewenste_output = """ > functie die doc string van andere functie print > functie die doc string van andere functie print > functie die doc string van andere functie print > functie die doc string van andere functie print > """ > > # l l > > Dank je wel > > Groeten > Geert Stappers > -- > Leven en laten leven > _______________________________________________ > Python-nl mailing list > Python-nl at python.org > https://mail.python.org/mailman/listinfo/python-nl > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 0 at media2b.net Mon Mar 6 09:05:33 2017 From: 0 at media2b.net (Berco Beute) Date: Mon, 6 Mar 2017 15:05:33 +0100 Subject: [python-nl] PyGrunn 2017! Vrijdag 19 mei, tickets, rfp, sponsoring... Message-ID: Dag allemaal, Onze jaarlijkse Python conferentie in Groningen (PyGrunn ) vindt dit jaar plaats op vrijdag 19 Mei. Wij zijn ondertussen hard aan het werk om er weer een groot en memorabel feest van te maken, en daarvoor zijn we op zoek naar deelnemers, sprekers en sponsors. Over PyGrunn PyGrunn is de jaarlijkse 'Python and friends' conferentie met een 'local footprint and global mindset'. Stevig in de open source wereld geworteld biedt het helden uit de open source gemeenschap een podium om te informeren, inspireren en imponeren. Maar het belangrijkste is altijd het ontmoeten van gelijkgestemden in een ontspannen setting. PyGrunn heeft geen commercieel oogmerk waardoor de ticketprijs laag is. Voor slechts 35 euro krijg je eten, drinken, een legendarisch T-shirt, en een dag vol inspirerende presentaties en interessante ontmoetingen. Geen geld! Mocht je nog niet overtuigd zijn dan zou je een bezoeker van voorgaande jaren eens moeten vragen. Sprekers gezocht (RFP) Mocht je bij willen dragen dan ben je van harte welkom. Dat kan in eerste plaats door het geven van een presentatie. Het is een unieke kans om je verhaal aan meer dan 250 vriendelijke en enthousiaste Pythonistas te vertellen. Op www.pygrunn.org staat een RFP waarmee je jouw praatje kunt aanmelden. Daarmee treed je toe aan de rij illustere voorgangers (zie www.pygrunn.org). Lokatie Net als afgelopen jaar vindt PyGrunn plaats in het Groninger Forum (Hereplein 4-5, Groningen ). Je kunt dus wederom vanuit een comfortabele bioscoopstoel de presentaties tot je nemen. Het wordt niet veel relaxter dan dat! Tickets Tickets zijn verkrijgbaar via www.pygrunn.org. De 250 kaartjes worden ongetwijfeld uitverkocht, dus zorg dat je er op tijd bij bent. De 35 euro mag eigenlijk geen belemmering zijn. Het is optioneel, maar om te laten weten dat je komt kun je jezelf daarnaast ook op de PyGrunn Meetup aanmelden. Sponsors Zoals gezegd heeft PyGrunn geen commercieel oogmerk en draait het al 8 jaar op de succesvolle combinatie van liefdewerk oud papier en sponsoring. Daarom zijn wij altijd op zoek naar sponsors die PyGrunn een warm hart toedragen. Dus mocht je een geschikte partij weten dan horen we dat graag. We zijn in ieder geval trots op het groeiend aantal sponsors, dit jaar verwelkomen wij in ieder geval al Media2B , Paylogic , Spindle , XIThing , Hugo en Contracts11 . Alvast bedankt! Diversiteit Ter verbetering van de diversiteit zijn we op dit moment met de Nederlandse organisatie van DjangoGirls in gesprek over een samenwerking tussen beide evenementen. Wat dat concreet gaat betekenen is nog onderwerp van discussie, maar het zal makkelijker worden voor bezoekers van een van de evenementen om ook het andere evenement bij te wonen. Daarover later meer. Zegt het voort, zegt het voort! Hopelijk zien we jullie op PyGrunn 2017! In de tussentijd kun je voor updates terecht op Twitter (@pygrunn ) en op www.pygrunn.org. Namens de PyGrunn organisatie, Berco Beute Media2B / Web11 / Kunnis Contracts11 / XIThing / B11 ================================== English version ================================== Hi everybody, We are proud to announce the seventh episode of the wonderful PyGrunn conference! We have spent a lot of effort trying to make this year's edition even better than last year's. About PyGrunn is the 'Python and friends' conference with a local footprint and global mindset. Firmly rooted in the open source culture it aims to provide the leading lights in advanced internet technologies a platform to inform, inspire and impress their peers. But the most important part is of course hanging out with peers. PyGrunn has a non-commercial character and tickets are just 35 euro, which is only for covering the costs of food, drinks and an already legendary t-shirt. Days chock-full of pyhon/geek/hacker fun don't come much cheaper than that! Still in doubt? Ask someone who visited a previous edition. Speaking opportunity Got a great Python story to tell? This is your chance to do so in front of a friendly and enthusiastic audience of over 250 Pythonistas! You can find the RFP for submitting your proposal at www.pygrunn.org. Location Just as last year this year's edition will take place on May 19th at Groninger Forum (Hereplein 4-5, Groningen ). So yes, once again you will be able to enjoy the talks from the comfort of a cinema chair. Tickets Tickets are already on sale at www.pygrunn.org. There are only 250 tickets available and they will be sold out for sure, so don't hesitate. The 35 euro should not hold you back. Optionally, you can indicate your attendance at the PyGrunn Meetup . But don?t forget to buy a ticket as well. Sponsors Since PyGrunn has a non-commercial character it depends on sponsors. As always Media2B will cover a lot of the costs, and we are excited by the growing number of business sponsors. This year we're welcoming Media2B , Paylogic , Spindle , XIThing , Hugo and Contracts11 . Still, we would love to see more sponsors supporting the PyGrunn community. So be sure to check if your company could become a sponsor. Diversity To promote diversity we?re actively in discussion with the Dutch organisation of DjangoGirls. We would like both communities to integrate and help each other. More on that later. Spread the word and we hope to see you all at PyGrunn 2017! In the meantime follow us on Twitter (@pygrunn ) and www.pygrunn.org. On behalf of the organizing committee, Berco Beute Media2B / Web11 / Kunnis Contracts11 / XIThing / B11 -------------- next part -------------- An HTML attachment was scrubbed... URL: