Function
We track 23 posts about Function from 11 engineering blogs. Most active: Real Python, Raymond Chen, Red. Latest post: Nov 9, 2026.
Companies writing about Function
Recent posts
If the Windows Update hot patcher checks that the function hasn’t already been patched, does that mean you can’t install two hot-patches? (opens on the source site)
It knows what it did. The post If the Windows Update hot patcher checks that the function hasn’t already been patched, does that mean you can’t install two hot-patches? appeared first on The Old New Thing.
Operator and Function Overloading in Custom Python Classes (opens on the source site)
If you’ve used the + or * operator on a str object in Python, you must have noticed its different behavior when compared to int or float objects: Language: Python >>> # Adds the two numbers >>> 1 + 2 3 >>> # Concatenates the two strings >>> "Real" + "Python" 'RealPython' >>> # Gives the product >>> 3 * 2 6 >>> # Repeats the string >>> "Python" * 3 'PythonPythonPython' You might have wondered how the same built-in operator or function shows different behavior for objects of different classes. This is called operator overloading or function overloading respectively. This article will help you…
Using the Python zip() Function for Parallel Iteration (opens on the source site)
Python’s zip() function combines elements from multiple iterables. Calling zip() generates an iterator that yields tuples, each containing elements from the input iterables. This function is essential for tasks like parallel iteration and dictionary creation, offering an efficient way to handle multiple sequences in Python programming. By the end of this tutorial, you’ll understand that: zip() in Python aggregates elements from multiple iterables into tuples, facilitating parallel iteration. dict(zip()) creates dictionaries by pairing keys and values from two sequences. zip() is lazy in…
Vercel Flags starts 7x faster and no longer extends function duration (opens on the source site)
Vercel ·
On Vercel, the Vercel Flags SDK now initializes faster on cold starts, and usage reporting no longer keeps functions running after the response. Faster cold starts Two changes speed up SDK initialization on cold starts: The SDK loads and parses the flags datafile bundled with your deployment as soon as the client is created, so it’s ready before your code evaluates its first flag. Every function invocation now includes the current datafile revision, so the SDK can check whether the bundled datafile is up to date without a network request. In internal testing, eliminating the network wait…
Defining Your Own Python Function (opens on the source site)
A Python function is a named block of code that performs specific tasks and can be reused in other parts of your code. Python has several built-in functions that are always available, and you can also create your own. These are known as user-defined functions. To define a function in Python, you use the def keyword, followed by the function name and an optional list of parameters enclosed in a required pair of parentheses. You can call and reuse a function by using its name, a pair of parentheses, and the necessary arguments. Learning to define and call functions is a fundamental skill for…
Quiz: Defining Your Own Python Function (opens on the source site)
In this quiz, you’ll test your understanding of Defining Your Own Python Function. You’ll revisit how to define a function with the def keyword, specify parameters, pass arguments, and call your functions to make code modular and reusable. You’ll also see how functions help organize and maintain your Python projects. Ready to demonstrate your skills? Let’s begin! [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Quiz: Python's len() Function (opens on the source site)
In this quiz, you’ll test your understanding of Python’s len() Function. By working through this quiz, you’ll revisit which objects len() accepts, how it behaves with NumPy arrays and pandas DataFrames, and how to support it in your own classes. Along the way, you’ll see why one small function can work on everything from built-in containers to the classes you write. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
If somebody tries to hot-patch an already-hot-patched function, how do they avoid conflicts? (opens on the source site)
Hot-patching is for Windows, not for you. The post If somebody tries to hot-patch an already-hot-patched function, how do they avoid conflicts? appeared first on The Old New Thing.
Quiz: Operator and Function Overloading in Custom Python Classes (opens on the source site)
In this quiz, you’ll test your understanding of Operator and Function Overloading in Custom Python Classes. By working through this quiz, you’ll revisit how Python’s data model connects built-in functions and operators to the special methods on a class. You’ll cover both the forward and reverse forms of those operators. Overloading is what makes your own objects behave the way other Python programmers expect, so getting comfortable with these special methods pays off in every class you write. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your…
C++ reminder: Function-local static variables are initialized only once, even if it looks like they get initialized multiple times (opens on the source site)
Only on first execution. The post C++ reminder: Function-local static variables are initialized only once, even if it looks like they get initialized multiple times appeared first on The Old New Thing.
The Python print() Function: Go Beyond the Basics (opens on the source site)
Learn about Python's print() function, discover its lesser-known features, avoid common mistakes, and know when to use a better alternative.
Quiz: The Python print() Function: Go Beyond the Basics (opens on the source site)
Check what you know about Python's print() function, including string formatting, escape sequences, file streams, and when to reach for logging instead.
Reducing C++ template bloat by factoring out the type-dependent portions of the function, practical exam (opens on the source site)
Applying our principles. The post Reducing C++ template bloat by factoring out the type-dependent portions of the function, practical exam appeared first on The Old New Thing.
Reducing C++ template bloat by factoring out the type-dependent portions of the function (opens on the source site)
Looking for consolidation points. The post Reducing C++ template bloat by factoring out the type-dependent portions of the function appeared first on The Old New Thing.
The new clamp() function in PHP 8.6 (opens on the source site)
You know how sometimes you want to ensure that a value stays within a specific range? Maybe you’re working with user input, configuration values, or any scenario where you need to enforce boundaries.
How To Type Function Mocha Context With Cypress Aliases (opens on the source site)
In Cypress you can save values under aliases which is pretty handy. You can get the aliased value using the cy.get, or by using a cy.then(function () { ... }) callback, or (my favorite solution) using the alias in the next hook or test callback via this.[alias] property 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 beforeEach(() => { cy.wrap(42).as('answer') // later in the same code cy.get('@answer') .should('equal', 42) // alternative 1: cy.then(callback) cy.get(...) .then(function () { // we can access the aliased value expect(this.answer, 'answer').to.equal(42) }) }) // alternative 2 //…
Flatten function/operation in functional programming (opens on the source site)
Flatten function/operation is what you want to apply to source code tree written in Java, like this: ├── hadoop-client-integration-tests │ ├── pom.xml │ └── src │ └── test │ ├── java │ │ └── org │ │ └── apache │ │ └── hadoop │ │ └── example │ │ ├── ITUseHadoopCodecs.java │ │ └── ITUseMiniCluster.java │ └── resources │ ├── hdfs-site.xml │ └── log4j.properties (the post first published at 20251208.) List of my other blog posts. Subscribe to my news feed, If you noticed a typo/bug/error or have any suggestions, do not hesitate to drop me a note: my emails. Or use my zulip for feedback. Or…
Partial Function Application is coming in PHP 8.6 (opens on the source site)
Ever reach for a simple callback and end up writing a tiny novella—an arrow function stuffed with types, reordered parameters, and boilerplate just to pass one value through?
Dynamic Refinements and Function Application (opens on the source site)
Red ·
It's Time to Apply Yourself to Red Red has never had an apply function, though we knew it would come someday. In the meantime, some of us rolled our own. Gregg's was simple, neither flexible nor efficient, and just a couple lines of code. Boris made a much more capable version, but it could still only be so fast as a mezzanine. R2 had a mezz version, which suffered the same problem. All that changes now. Apply is dead! Long live Apply! It required deep work, and a lot of design effort, but we think you'll like the results, whether you're a high-level Reducer, or anxious to see how much…
Dynamic Refinements and Function Application (opens on the source site)
Red ·
It's Time to Apply Yourself to Red Red has never had an apply function, though we knew it would come someday. In the meantime, some of us rolled our own. Gregg's was simple, neither flexible nor efficient, and just a couple lines of code. Boris made a much more capable version, but it could still only be so fast as a mezzanine. R2 had a mezz version, which suffered the same problem. All that changes now. Apply is dead! Long live Apply! It required deep work, and a lot of design effort, but we think you'll like the results, whether you're a high-level Reducer, or anxious to see how much…
How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ (opens on the source site)
jOOQ ·
Microsoft T-SQL supports a language feature called table-valued parameter (TVP), which is a parameter of a table type that can be passed to a stored procedure or function. For example, you may write: This function takes a table-valued parameter (TVP), and produces a result set containing the cross product of the parameter table with itself. … Continue reading How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ →
Search Box and Cloud Function (opens on the source site)
For a blog hosted with Firebase Hosting, it turns out that a little search box is fairly easy to implement by using Cloud Functions for Firebase.
TDD a ReasonML Function (opens on the source site)
Let's test-drive some ReasonML code together. The Goal Our goal will be to recreate a simple List.map from the stdlib. Ours will be called Listy.map. To get started, download the exercise on github: git clone [email protected]:jaketrent/reason-kata-map.git And setup the project for development: cd reason-kata-map npm install The Test Suite We'll start with an existing test suite (in __tests__/listy_test.re). Here's the suite: open Jest; open Listy; let () = describe "map" ExpectJs.(fun () => { test "map []" (fun () => { let noop = fun () => {}; expect(Listy.map noop []) |> toEqual [] }); test…
Related topics
This page is generated automatically from the engineering blogs we follow. Every post links to its source, where it was published. See all sources.