<commit_before>//#####################################################################
// Class Object
//#####################################################################
#include <other/core/python/Object.h>
#include <other/core/python/Class.h>
using namespace other;

OTHER_DEFINE_TYPE(Object)

Object::Object() {}
Object::~Object() {}

void wrap_object() {
  Class<Object>("Object")
    .OTHER_INIT();
}<commit_msg>Object: Assert that we're inside new_ or a wrapped constructor<commit_after>//#####################################################################
// Class Object
//#####################################################################
#include <other/core/python/Object.h>
#include <other/core/python/Class.h>
using namespace other;

OTHER_DEFINE_TYPE(Object)

Object::Object() {
#ifndef NDEBUG
  const auto self = (PyObject*)this-1;
  assert(self->ob_refcnt==1); // Partially check that object was constructed inside new_ or a wrapped constructor
#endif
}

Object::~Object() {}

void wrap_object() {
  Class<Object>("Object")
    .OTHER_INIT();
}
{'fraction_non_alphanumeric': 0.3747663551401869, 'fraction_numerical': 0.001869158878504673, 'mean_word_length': 6.992537313432836, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5902358', 'n_tokens_mistral': 288, 'n_tokens_neox': 272, 'n_words': 63}