Search Results
| Search type | Search syntax |
|---|---|
| Tags | [tag] |
| Exact | "words here" |
| Author | user:1234 user:me (yours) |
| Score | score:3 (3+) score:0 (none) |
| Answers | answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
| Views | views:250 |
| Code | code:"if (foo != bar)" |
| Sections | title:apples body:"apples oranges" |
| URL | url:"*.example.com" |
| Saves | in:saves |
| Status | closed:yes duplicate:no migrated:no wiki:no |
| Types | is:question is:answer |
| Exclude | -[tag] -apples |
| For more details on advanced search visit our help page | |
Results tagged with python
Search options not deleted user 397235
Python is a dynamically typed, high-level interpreted programming language. Its design focuses on clear syntax, an intuitive approach to object-oriented programming, and making the right way to do things obvious. Python supports modules and exceptions, and has an extensive standard module library. Python is general-purpose and thus used widely, from the web to embedded systems.
2 votes
Using an instance method or a function with conditional logic based on type
Intro If I'm understanding you right, you have a base class with 3 "write" methods: class BaseClass(ABC): @abstractmethod def required_method_1(self): # some number of required methods …
1 vote
1 answer
94 views
How to test integration with an infinite generator
High-level implementation (Python): def startup(): config = get_config() kafka_consumer = Consumer(config.kafka, INPUT_TOPIC) kafka_producer = Producer(config.kafka, OUTPUT_TOPIC) consume … messages: Iterable, publish: Callable): for message in messages: payload = transform(message) publish(payload) Now, testing consume is easy: I can pass it any iterable of messages (as python …