About 848,000 results
Open links in new tab
  1. What exactly is metaprogramming? - Stack Overflow

    Some comments in the article refer to metaprogramming as the ability to generate code (perhaps on the fly). Is metaprogramming the ability to generate code on the fly or is it the ability to …

  2. Metaprogramming in Python - adding an object method

    I've got a background in Python (though entirely self-taught, so I might have some bad habits or misconceptions), and I'm trying to learn Ruby to broaden my scope. I was reading through …

  3. python - How to support dynamic type hinting with …

    Jan 31, 2019 · Python is a dynamic language. That means an object can be anything, and can be transformed at run time. Certain features, like type-hinting, work by static analysis - and …

  4. Python metaprogramming: generate a function signature with …

    May 17, 2018 · I am working within a Python web framework that uses Python 3 type annotations for validation and dependency injection. So I am looking for a way to generate functions with …

  5. oop - What are metaclasses in Python? - Stack Overflow

    If you do so, Python will use the metaclass to create the class Foo. Careful, it's tricky. You write class Foo(object) first, but the class object Foo is not created in memory yet. Python will look …

  6. Python metaprogramming, dynamic types, and static type checking

    Apr 5, 2024 · FWIW even the most recent version of the book Fluent Python, in its metaprogramming section, seems not to implement any sort of type checking. goal. I am …

  7. Python metaprogramming: automatically generate member …

    Sep 10, 2012 · Here's an real example from your newly posted code: import types def attach_on_sample_slider(obj, base): def on_sample_slider(self, value): self.samples = …

  8. python metaprogramming - Stack Overflow

    May 15, 2010 · I'm trying to archive a task which turns out to be a bit complicated since I'm not very good at Python metaprogramming. I want to have a module locations with function …

  9. Python vs. Ruby for metaprogramming - Stack Overflow

    Sep 28, 2008 · Metaprogramming: Python supports metaclasses and runtime class/method generation etc; Syntax: Well thats somehow subjective. I like Pythons syntax for its simplicity, …

  10. metaprogramming - Ruby’s “method_missing” in Python - Stack …

    Apr 5, 2017 · As others have mentioned, in Python, when you execute o.f(x), it's really a two-step operation: First, get the f attribute of o, then call it with parameter x. It's the first step that fails …

Refresh