The Artima Developer Community
Sponsored Link

Python Buzz Forum
Is it real or just a lambda?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Victor Ng

Posts: 112
Nickname: victorng
Registered: Aug, 2003

Victor Ng programs Python for money, but he'd be programming Python anyway if he was a bum.
Is it real or just a lambda? Posted: Nov 7, 2004 7:45 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Victor Ng.
Original Post: Is it real or just a lambda?
Feed Title: Victor Ng's Weblog
Feed URL: https://blog.crankycoder.com/feed/atom/
Feed Description: Python Feed
Latest Python Buzz Posts
Latest Python Buzz Posts by Victor Ng
Latest Posts From Victor Ng's Weblog

Advertisement
I've been tooling around deep into metaclass land in Python. It really is true. Most programmers won't care about metaclasses - but when you need them - you really need them. I've recently had a problem where I need to replace functions -but sometimes they're hand written, and sometimes they're lambda functions that are code generated. How do you tell the difference? You just ask it for it's __name__. >>> def foo(): ... return 10 ... >>> bar = lambda: 15 >>> foo.__name__ 'foo' >>> bar.__name__ '<lambda>' Neato....

Read: Is it real or just a lambda?

Topic: quant books Previous Topic   Next Topic Topic: quant stuff

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use